Files
narlblog/docker-compose.yml
T

61 lines
1.3 KiB
YAML

name: elas-atelier
services:
backend:
container_name: elas-atelier-backend
build:
context: ./backend
dockerfile: Dockerfile
expose:
- "3000"
volumes:
- ./data:/app/data
environment:
- PORT=3000
# No fallback — fail fast if ADMIN_TOKEN isn't set in your .env.
- ADMIN_TOKEN=${ADMIN_TOKEN:?ADMIN_TOKEN must be set in .env}
- DATA_DIR=/app/data
- COOKIE_SECURE=${COOKIE_SECURE:-true}
- FRONTEND_ORIGIN=${FRONTEND_ORIGIN:-}
- RUST_LOG=${RUST_LOG:-info}
restart: unless-stopped
networks:
- atelier_net
healthcheck:
test: ["CMD", "curl", "-fsS", "http://localhost:3000/healthz"]
interval: 15s
timeout: 3s
retries: 5
start_period: 10s
logging:
driver: json-file
options:
max-size: "10m"
max-file: "3"
frontend:
container_name: elas-atelier-frontend
build:
context: ./frontend
dockerfile: Dockerfile
ports:
- "4322:4321"
environment:
- PUBLIC_API_URL=http://backend:3000
depends_on:
backend:
condition: service_healthy
restart: unless-stopped
networks:
- atelier_net
logging:
driver: json-file
options:
max-size: "10m"
max-file: "3"
networks:
atelier_net:
name: elas-atelier-net
driver: bridge