feat: Run application using docker compose#12
feat: Run application using docker compose#12ForeverRainmaN wants to merge 1 commit intoEpamLifeSciencesTeam:mainfrom
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.
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.
GrigoriiBerezin
left a comment
There was a problem hiding this comment.
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.
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 No newline at end of file |
There was a problem hiding this comment.
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.
docker-compose NOT docker compose
No description provided.