Skip to content

Commit

Permalink
docker-compose: update with s3 vars + healthchecks
Browse files Browse the repository at this point in the history
  • Loading branch information
digorgonzola committed Nov 17, 2023
1 parent ab5c9ed commit bc31321
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 2 deletions.
12 changes: 11 additions & 1 deletion docker-compose-proxy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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:
9 changes: 8 additions & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,19 @@ 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
environment:
- POSTGRES_DB=app
- POSTGRES_USER=postgres
- POSTGRES_PASSWORD=supersecretpassword
healthcheck:
test: ["CMD-SHELL", "pg_isready"]
interval: 10s
timeout: 5s
retries: 5

0 comments on commit bc31321

Please sign in to comment.