Files
narlblog/docker-compose.yml
T
nvrl 37f88f5ad1
CI / frontend (push) Failing after 1s
CI / backend (push) Failing after 1s
fix blog without image
2026-05-21 04:09:02 +02:00

63 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:-}
- SITE_MODE=${SITE_MODE:-atelier}
- 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