From 25f771cdd720766d2de2d6361072422f109ec384 Mon Sep 17 00:00:00 2001 From: Ethan Roseman Date: Tue, 22 Nov 2022 23:18:32 +0900 Subject: [PATCH] more --- caddy.env | 1 - deployment/frogress/entrypoint.sh | 10 ++-------- docker-compose.yaml | 10 +++++----- 3 files changed, 7 insertions(+), 14 deletions(-) delete mode 100644 caddy.env diff --git a/caddy.env b/caddy.env deleted file mode 100644 index 5597f4e..0000000 --- a/caddy.env +++ /dev/null @@ -1 +0,0 @@ -PRODUCTION=NO diff --git a/deployment/frogress/entrypoint.sh b/deployment/frogress/entrypoint.sh index 8556094..33f8557 100755 --- a/deployment/frogress/entrypoint.sh +++ b/deployment/frogress/entrypoint.sh @@ -1,13 +1,7 @@ #!/usr/bin/env bash -DB_HOST=${DATABASE_HOST:-postgres} -DB_PORT=${DATABASE_PORT:-5432} - -BE_HOST=${BACKEND_HOST:-frogress} -BE_PORT=${BACKEND_PORT:-8000} - -until nc -z ${DB_HOST} ${DB_PORT} > /dev/null; do - echo "Waiting for database to become available on ${DB_HOST}:${DB_PORT}..." +until nc -z ${DATABASE_HOST} ${DATABASE_PORT} > /dev/null; do + echo "Waiting for database to become available on ${DATABASE_HOST}:${DATABASE_PORT}..." sleep 1 done diff --git a/docker-compose.yaml b/docker-compose.yaml index ab90eaa..d53efbd 100644 --- a/docker-compose.yaml +++ b/docker-compose.yaml @@ -1,12 +1,12 @@ version: '2' services: postgres: - image: postgres:13-alpine + image: postgres:15.1-bullseye environment: - POSTGRES_USER: frogress - POSTGRES_PASSWORD: frogress + POSTGRES_USER: ${POSTGRES_USER} + POSTGRES_PASSWORD: ${POSTGRES_PASSWORD} ports: - - "5432:5432" + - "${POSTGRES_PORT}:${POSTGRES_PORT}" volumes: - ./deployment/postgres/data:/var/lib/postgresql/data frogress: @@ -14,4 +14,4 @@ services: context: . dockerfile: deployment/frogress/Dockerfile ports: - - "8000:8000" + - "${BACKEND_PORT}:${BACKEND_PORT}"