Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 19 additions & 3 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@ x-app: &default-app
- "NODE_ENV=${NODE_ENV:-production}"
depends_on:
postgres:
condition: "service_started"
condition: "service_healthy"
required: false
redis:
condition: "service_started"
condition: "service_healthy"
required: false
env_file:
- ".env"
Expand Down Expand Up @@ -49,11 +49,16 @@ services:
environment:
POSTGRES_USER: "${POSTGRES_USER}"
POSTGRES_PASSWORD: "${POSTGRES_PASSWORD}"
# POSTGRES_DB: "${POSTGRES_DB}"
POSTGRES_DB: "${POSTGRES_DB}"
image: "postgres:16.3-bookworm"
profiles: ["postgres"]
restart: "${DOCKER_RESTART_POLICY:-unless-stopped}"
stop_grace_period: "3s"
healthcheck:
test: ["CMD-SHELL", "pg_isready -U $$POSTGRES_USER -d $$POSTGRES_DB"]
interval: 5s
timeout: 5s
retries: 5
volumes:
- "postgres:/var/lib/postgresql/data"

Expand All @@ -67,6 +72,11 @@ services:
profiles: ["redis"]
restart: "${DOCKER_RESTART_POLICY:-unless-stopped}"
stop_grace_period: "3s"
healthcheck:
test: ["CMD-SHELL", "redis-cli ping | grep PONG"]
interval: 1s
timeout: 3s
retries: 5
volumes:
- "redis:/data"

Expand Down Expand Up @@ -96,6 +106,12 @@ services:
limits:
cpus: "${DOCKER_WORKER_CPUS:-0}"
memory: "${DOCKER_WORKER_MEMORY:-0}"
healthcheck:
test: ["CMD-SHELL", "celery -b ${REDIS_URL:-redis://redis:6379/0} inspect ping -d celery@$$HOSTNAME"]
interval: 30s
timeout: 10s
retries: 3
start_period: 10s
profiles: ["worker"]

js:
Expand Down
2 changes: 2 additions & 0 deletions src/config/gunicorn.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,5 @@
threads = int(os.getenv("PYTHON_MAX_THREADS", 1))

reload = bool(strtobool(os.getenv("WEB_RELOAD", "false")))

timeout = 120