From db6b97461700007fe4fecd872cbfa36ddda51bc2 Mon Sep 17 00:00:00 2001 From: Ethan Roseman Date: Wed, 23 Nov 2022 02:01:24 +0900 Subject: [PATCH] whoopz --- deployment/frogress/entrypoint.sh | 4 ++-- docker-compose.yaml | 7 +++++-- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/deployment/frogress/entrypoint.sh b/deployment/frogress/entrypoint.sh index 33f8557..2997fc2 100755 --- a/deployment/frogress/entrypoint.sh +++ b/deployment/frogress/entrypoint.sh @@ -1,7 +1,7 @@ #!/usr/bin/env bash -until nc -z ${DATABASE_HOST} ${DATABASE_PORT} > /dev/null; do - echo "Waiting for database to become available on ${DATABASE_HOST}:${DATABASE_PORT}..." +until nc -z ${POSTGRES_HOST} ${POSTGRES_PORT} > /dev/null; do + echo "Waiting for database to become available on ${POSTGRES_HOST}:${POSTGRES_PORT}..." sleep 1 done diff --git a/docker-compose.yaml b/docker-compose.yaml index d53efbd..a38fa9a 100644 --- a/docker-compose.yaml +++ b/docker-compose.yaml @@ -6,12 +6,15 @@ services: POSTGRES_USER: ${POSTGRES_USER} POSTGRES_PASSWORD: ${POSTGRES_PASSWORD} ports: - - "${POSTGRES_PORT}:${POSTGRES_PORT}" + - "${POSTGRES_PORT}:5432" volumes: - - ./deployment/postgres/data:/var/lib/postgresql/data + - ./deployment/postgres/data:/var/lib/postgresql/data frogress: build: context: . dockerfile: deployment/frogress/Dockerfile ports: - "${BACKEND_PORT}:${BACKEND_PORT}" + environment: + POSTGRES_HOST: ${POSTGRES_HOST} + POSTGRES_PORT: 5432