This commit is contained in:
Ethan Roseman 2022-11-23 02:01:24 +09:00
parent 25f771cdd7
commit db6b974617
No known key found for this signature in database
GPG Key ID: 27F9FCEB8E4969BD
2 changed files with 7 additions and 4 deletions

View File

@ -1,7 +1,7 @@
#!/usr/bin/env bash #!/usr/bin/env bash
until nc -z ${DATABASE_HOST} ${DATABASE_PORT} > /dev/null; do until nc -z ${POSTGRES_HOST} ${POSTGRES_PORT} > /dev/null; do
echo "Waiting for database to become available on ${DATABASE_HOST}:${DATABASE_PORT}..." echo "Waiting for database to become available on ${POSTGRES_HOST}:${POSTGRES_PORT}..."
sleep 1 sleep 1
done done

View File

@ -6,12 +6,15 @@ services:
POSTGRES_USER: ${POSTGRES_USER} POSTGRES_USER: ${POSTGRES_USER}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD} POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
ports: ports:
- "${POSTGRES_PORT}:${POSTGRES_PORT}" - "${POSTGRES_PORT}:5432"
volumes: volumes:
- ./deployment/postgres/data:/var/lib/postgresql/data - ./deployment/postgres/data:/var/lib/postgresql/data
frogress: frogress:
build: build:
context: . context: .
dockerfile: deployment/frogress/Dockerfile dockerfile: deployment/frogress/Dockerfile
ports: ports:
- "${BACKEND_PORT}:${BACKEND_PORT}" - "${BACKEND_PORT}:${BACKEND_PORT}"
environment:
POSTGRES_HOST: ${POSTGRES_HOST}
POSTGRES_PORT: 5432