Skip to content

Commit

Permalink
Update compose files
Browse files Browse the repository at this point in the history
  • Loading branch information
Rmarieta committed Jan 16, 2024
1 parent 3764498 commit 4a60b7d
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 10 deletions.
9 changes: 4 additions & 5 deletions docker-compose.prod.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,13 @@ services:
db:
image: postgres:16.1
container_name: db
env_file:
- .env
environment:
- POSTGRES_USER=${POSTGRES_USER}
- POSTGRES_DB=${POSTGRES_DB}
- POSTGRES_USER=${RDS_USERNAME}
- POSTGRES_PASSWORD=${RDS_PASSWORD}
- POSTGRES_DB=${RDS_DB_NAME}
healthcheck:
# checking when the database is ready for the flask app to wait
test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER} -d ${POSTGRES_DB}"]
test: ["CMD-SHELL", "pg_isready -U ${RDS_USERNAME} -d ${RDS_DB_NAME}"]
interval: 5s
timeout: 20s
retries: 5
Expand Down
9 changes: 4 additions & 5 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,15 @@ services:
db:
image: postgres:16.1
container_name: db
env_file:
- .env
environment:
- POSTGRES_USER=${POSTGRES_USER}
- POSTGRES_DB=${POSTGRES_DB}
- POSTGRES_USER=${RDS_USERNAME}
- POSTGRES_PASSWORD=${RDS_PASSWORD}
- POSTGRES_DB=${RDS_DB_NAME}
volumes:
- db-volume:/var/lib/postgresql/datascalable
healthcheck:
# checking when the database is ready for the flask app to wait
test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER} -d ${POSTGRES_DB}"]
test: ["CMD-SHELL", "pg_isready -U ${RDS_USERNAME} -d ${RDS_DB_NAME}"]
interval: 5s
timeout: 20s
retries: 5
Expand Down

0 comments on commit 4a60b7d

Please sign in to comment.