- enable Next.js standalone output and add Docker/Caddy production stack - add production env template and deployment runbook - add healthcheck endpoint for container supervision - fix existing lint/type blockers discovered during validation Co-Authored-By: Paperclip <noreply@paperclip.ing>
42 lines
802 B
YAML
42 lines
802 B
YAML
services:
|
|
app:
|
|
build:
|
|
context: .
|
|
dockerfile: Dockerfile
|
|
container_name: karbe-app
|
|
restart: unless-stopped
|
|
env_file:
|
|
- .env.production
|
|
networks:
|
|
- karbe
|
|
healthcheck:
|
|
test: ["CMD", "wget", "-qO", "-", "http://127.0.0.1:3000/api/health"]
|
|
interval: 30s
|
|
timeout: 5s
|
|
retries: 5
|
|
start_period: 30s
|
|
|
|
caddy:
|
|
image: caddy:2.10-alpine
|
|
container_name: karbe-caddy
|
|
restart: unless-stopped
|
|
ports:
|
|
- "80:80"
|
|
- "443:443"
|
|
depends_on:
|
|
app:
|
|
condition: service_healthy
|
|
volumes:
|
|
- ./docker/Caddyfile:/etc/caddy/Caddyfile:ro
|
|
- caddy_data:/data
|
|
- caddy_config:/config
|
|
networks:
|
|
- karbe
|
|
|
|
networks:
|
|
karbe:
|
|
name: karbe-net
|
|
|
|
volumes:
|
|
caddy_data:
|
|
caddy_config:
|