From 4a60b7db6f7ecc3ed5d4acf59bb93fe37809dca3 Mon Sep 17 00:00:00 2001 From: Rmarieta Date: Tue, 16 Jan 2024 10:43:06 +0100 Subject: [PATCH] Update compose files --- docker-compose.prod.yml | 9 ++++----- docker-compose.yml | 9 ++++----- 2 files changed, 8 insertions(+), 10 deletions(-) diff --git a/docker-compose.prod.yml b/docker-compose.prod.yml index 0474d9d..42405cf 100644 --- a/docker-compose.prod.yml +++ b/docker-compose.prod.yml @@ -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 diff --git a/docker-compose.yml b/docker-compose.yml index 28db090..8f1016c 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -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