-
Notifications
You must be signed in to change notification settings - Fork 8
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
feat: Run application using docker compose #12
base: main
Are you sure you want to change the base?
feat: Run application using docker compose #12
Conversation
5ba4575
to
e33b1a2
Compare
e33b1a2
to
02e6470
Compare
url = "jdbc:postgresql://"${RANDOM_COFFEE_DB_SERVER_NAME}":5432/coffee_db?currentSchema=authentication" | ||
user = "postgres" | ||
user = ${?AUTH_DB_USER} | ||
user = "postgres" | ||
password = "postgres" | ||
password = "postgres" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think you should use parameters from an additional env or conf file with {SOME_PARAMETER}. Because if you create a dev or prod pipeline, you can use ansible or something else to create that.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great job, but some things could be improved.
Also don't forget about checking, that every file contains newline at the EOF
@@ -0,0 +1,7 @@ | |||
#!/bin/bash | |||
set -e | |||
psql -v ON_ERROR_STOP=1 --username "postgres" --dbname "coffee_db" <<-EOSQL |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You've forgot about making username and dbname come from envs
COFFEE_CONTAINER_PATH=/random_coffee/app | ||
COFFEE_CONTAINER_NAME=random_coffee | ||
COFFEE_CONTAINER_LOGS=/random_coffee/app/logs | ||
COFFEE_CONTAINER_PORT=8080 | ||
COFFEE_DB_HOST=postgres | ||
COFFEE_DB_PORT_NUMBER=5432 | ||
COFFEE_DB_NAME=coffee_postgres_db | ||
COFFEE_DB_USER=postgres | ||
COFFEE_DB_PASSWORD=postgres | ||
COFFEE_DB_CONTAINER_NAME=coffee_postgres |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you will leave env example, please make sure, that it does not contain any sensitive data such as username and passwords, replace it with dummy values
``` | ||
After image is created, run: | ||
``` | ||
docker compose up / docker compose up -d (if you wan't compose to run in detached mode) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
docker-compose NOT docker compose
No description provided.