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