Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes #13, Update Server Configuration #14

Merged
merged 5 commits into from
Sep 13, 2023

Conversation

JolanThomassin
Copy link
Contributor

Fixes #13,

  • adding "echo" to specify if the server already exist in postgres.sh.
  • commenting code in lib.sh
  • slight modification on the createdb line in setup-db-docker.sh

bin/lib.sh Outdated Show resolved Hide resolved
bin/postgres.sh Outdated Show resolved Hide resolved
bin/postgres.sh Outdated
docker start louis-db-server
elif [ "$STATUS" != "running" ]; then
# check PGPASWORD before using it
echo container does not exist, creating
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

update here today

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

more details in your string, including container name

bin/setup-db-docker.sh Show resolved Hide resolved
bin/setup-db-docker.sh Show resolved Hide resolved
@JolanThomassin JolanThomassin self-assigned this Sep 12, 2023
@JolanThomassin
Copy link
Contributor Author

I've introduced a verification function in the last commit (74d69c4) called is_parameter_empty in lib.sh to validate parameters before their usage. Currently, this function is implemented specifically for PGPASSWORD and DB_SERVER_CONTAINER_NAME.

@JolanThomassin
Copy link
Contributor Author

I've applied modification on the verification function in the last commit (0ce5846), now you can utilize the function to validate all environment variables before their usage, if any of them are undefined or empty, the execution will stop.

bin/lib.sh Outdated Show resolved Hide resolved
Copy link
Contributor

@rngadam rngadam left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

also add usage information to the README.md in bin/

bin/lib.sh Show resolved Hide resolved
bin/postgres.sh Outdated
docker start louis-db-server
elif [ "$STATUS" != "running" ]; then
# check PGPASWORD before using it
echo container does not exist, creating
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

more details in your string, including container name

bin/postgres.sh Outdated
elif [ "$STATUS" != "running" ]; then
echo container does not exist, creating
docker run --name louis-db-server \
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this should be using your environment variable...

bin/setup-db-docker.sh Outdated Show resolved Hide resolved
bin/lib.sh Show resolved Hide resolved
@JolanThomassin
Copy link
Contributor Author

JolanThomassin commented Sep 13, 2023

In the last commit (8ba5038), I have replace existing variable names with environment variables. This update enhances the flexibility by allowing configuration settings to be managed externally through environment variables, making it easier to adapt to different deployment environments.

@JolanThomassin
Copy link
Contributor Author

We observed that the code exhibited a high degree of specificity towards louis-db. To enhance flexibility, we have initiated a new issue : #15

@JolanThomassin JolanThomassin merged commit 2b0f0c4 into issue8-missing-chunks Sep 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants