1ec64e4ad5
Switch from hardcoded credentials to env var substitution (DB_PASSWORD, SESSION_SECRET, ORIGIN). Use production ports (3200:3000, 3201:5432) and host.docker.internal for DB connectivity. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
47 lines
1.1 KiB
YAML
47 lines
1.1 KiB
YAML
services:
|
|
db:
|
|
image: postgres:16-alpine
|
|
restart: unless-stopped
|
|
environment:
|
|
POSTGRES_USER: kanban
|
|
POSTGRES_PASSWORD: ${DB_PASSWORD}
|
|
POSTGRES_DB: kanban
|
|
ports:
|
|
- '3201:5432'
|
|
volumes:
|
|
- pgdata:/var/lib/postgresql/data
|
|
healthcheck:
|
|
test: ['CMD-SHELL', 'pg_isready -U kanban']
|
|
interval: 5s
|
|
timeout: 5s
|
|
retries: 5
|
|
|
|
app:
|
|
build: .
|
|
restart: unless-stopped
|
|
ports:
|
|
- '3200:3000'
|
|
extra_hosts:
|
|
- 'host.docker.internal:host-gateway'
|
|
environment:
|
|
DATABASE_URL: postgresql://kanban:${DB_PASSWORD}@host.docker.internal:3201/kanban?schema=public
|
|
SESSION_SECRET: ${SESSION_SECRET}
|
|
ORIGIN: ${ORIGIN:-https://kanban.catrenelle.com}
|
|
PORT: 3000
|
|
HOST: 0.0.0.0
|
|
depends_on:
|
|
db:
|
|
condition: service_healthy
|
|
healthcheck:
|
|
test: ['CMD', 'curl', '-f', 'http://localhost:3000/api/health']
|
|
interval: 30s
|
|
timeout: 5s
|
|
start_period: 10s
|
|
retries: 3
|
|
volumes:
|
|
- uploads:/app/uploads
|
|
|
|
volumes:
|
|
pgdata:
|
|
uploads:
|