From bc31321092f7af600d0588755f9698a9038b283e Mon Sep 17 00:00:00 2001 From: Stefan Hattrell <29941279+digorgonzola@users.noreply.github.com> Date: Fri, 17 Nov 2023 11:55:35 +1100 Subject: [PATCH] docker-compose: update with s3 vars + healthchecks --- docker-compose-proxy.yml | 12 +++++++++++- docker-compose.yml | 9 ++++++++- 2 files changed, 19 insertions(+), 2 deletions(-) diff --git a/docker-compose-proxy.yml b/docker-compose-proxy.yml index 8f52590..f477152 100644 --- a/docker-compose-proxy.yml +++ b/docker-compose-proxy.yml @@ -14,13 +14,18 @@ services: - DB_PASS=supersecretpassword - ALLOWED_HOSTS=* - ALLOWED_CIDR_NETS=127.0.0.0/8 + - S3_STORAGE_BACKEND=0 depends_on: - - db + db: + condition: service_healthy proxy: image: proxy:latest depends_on: - app + healthcheck: + test: ["CMD-SHELL", "curl -so /dev/null http://localhost:8000/ || exit 1"] + timeout: 10s ports: - "8000:8000" volumes: @@ -32,6 +37,11 @@ services: - POSTGRES_DB=app - POSTGRES_USER=postgres - POSTGRES_PASSWORD=supersecretpassword + healthcheck: + test: ["CMD-SHELL", "pg_isready"] + interval: 10s + timeout: 5s + retries: 5 volumes: static_data: diff --git a/docker-compose.yml b/docker-compose.yml index a6252bc..609dc7c 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -18,8 +18,10 @@ services: - DB_USER=postgres - DB_PASS=supersecretpassword - DEBUG=1 + - S3_STORAGE_BACKEND=0 depends_on: - - db + db: + condition: service_healthy db: image: postgres:10-alpine @@ -27,3 +29,8 @@ services: - POSTGRES_DB=app - POSTGRES_USER=postgres - POSTGRES_PASSWORD=supersecretpassword + healthcheck: + test: ["CMD-SHELL", "pg_isready"] + interval: 10s + timeout: 5s + retries: 5