Skip to content

feat: Run application using docker compose#12

Open
ForeverRainmaN wants to merge 1 commit intoEpamLifeSciencesTeam:mainfrom
ForeverRainmaN:EPMLSTRCMW-Run-Application-Using-Docker-Compose
Open

feat: Run application using docker compose#12
ForeverRainmaN wants to merge 1 commit intoEpamLifeSciencesTeam:mainfrom
ForeverRainmaN:EPMLSTRCMW-Run-Application-Using-Docker-Compose

Conversation

@ForeverRainmaN
Copy link
Copy Markdown

No description provided.

@ForeverRainmaN ForeverRainmaN force-pushed the EPMLSTRCMW-Run-Application-Using-Docker-Compose branch 2 times, most recently from 5ba4575 to e33b1a2 Compare April 6, 2022 10:28
@ForeverRainmaN ForeverRainmaN force-pushed the EPMLSTRCMW-Run-Application-Using-Docker-Compose branch from e33b1a2 to 02e6470 Compare April 6, 2022 10:31
Comment thread docker-compose.yml
Comment on lines +5 to 9
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"
Copy link
Copy Markdown

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.

Copy link
Copy Markdown
Collaborator

@GrigoriiBerezin GrigoriiBerezin left a 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

Comment thread init_db.sh
@@ -0,0 +1,7 @@
#!/bin/bash
set -e
psql -v ON_ERROR_STOP=1 --username "postgres" --dbname "coffee_db" <<-EOSQL
Copy link
Copy Markdown
Collaborator

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

Comment thread .env.example
Comment on lines +1 to +10
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
Copy link
Copy Markdown
Collaborator

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

Comment thread README.md
```
After image is created, run:
```
docker compose up / docker compose up -d (if you wan't compose to run in detached mode)
Copy link
Copy Markdown

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

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.

4 participants