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

feat: Run application using docker compose #12

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

ForeverRainmaN
Copy link

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
docker-compose.yml Show resolved Hide resolved
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"

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
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

@@ -0,0 +1,7 @@
#!/bin/bash
set -e
psql -v ON_ERROR_STOP=1 --username "postgres" --dbname "coffee_db" <<-EOSQL
Copy link
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 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
Copy link
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

```
After image is created, run:
```
docker compose up / docker compose up -d (if you wan't compose to run in detached mode)

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.

None yet

4 participants