Files
narlblog/docker-compose.yml
T
nvrl 39bbd9e925
CI / frontend (push) Successful in 38s
CI / backend (push) Failing after 19s
changed ports
2026-05-18 14:24:51 +02:00

62 lines
1.4 KiB
YAML

name: narlblog
services:
backend:
container_name: narlblog-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:
- internal_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: narlblog-frontend
build:
context: ./frontend
dockerfile: Dockerfile
ports:
- "4321"
environment:
- PUBLIC_API_URL=${PUBLIC_API_URL:-}
- SITE_MODE=${SITE_MODE:-atelier}
depends_on:
backend:
condition: service_healthy
restart: unless-stopped
networks:
- internal_net
logging:
driver: json-file
options:
max-size: "10m"
max-file: "3"
networks:
internal_net:
name: narlblog-net
driver: bridge