fcc9547a30
- compose.prod.yml: production stack with registry image, healthcheck, migration service - compose.test.yml: local test stack with source mount and LOCAL=true - routes/dev-login.ts: fake admin JWT login, only active when LOCAL=true - routes/_middleware.ts: expose /dev-login as public route Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
37 lines
872 B
YAML
37 lines
872 B
YAML
services:
|
|
db:
|
|
image: postgres:17-alpine
|
|
restart: unless-stopped
|
|
environment:
|
|
POSTGRES_PASSWORD: ${POSTGRES_PASS}
|
|
POSTGRES_USER: ${POSTGRES_USER:-postgres}
|
|
POSTGRES_DB: ${POSTGRES_DB:-polympr}
|
|
volumes:
|
|
- db_data:/var/lib/postgresql/data
|
|
healthcheck:
|
|
test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER:-postgres}"]
|
|
interval: 5s
|
|
timeout: 5s
|
|
retries: 10
|
|
|
|
migrate:
|
|
image: registry.docker.polytech.djalim.fr/polympr:latest
|
|
command: node_modules/.bin/drizzle-kit migrate
|
|
env_file: .env
|
|
depends_on:
|
|
db:
|
|
condition: service_healthy
|
|
|
|
app:
|
|
image: registry.docker.polytech.djalim.fr/polympr:latest
|
|
restart: unless-stopped
|
|
ports:
|
|
- "4430:443"
|
|
env_file: .env
|
|
depends_on:
|
|
migrate:
|
|
condition: service_completed_successfully
|
|
|
|
volumes:
|
|
db_data:
|