Multi-stage Dockerfile (node build → caddy:2-alpine production, node dev). Compose base + dev override for prod/dev switching via .env ENVIRONMENT flag. Makefile targets: build, up, down, restart, logs, dev, prod, clean, rebuild. Caddyfile serves static Astro output with caching and compression.
17 lines
276 B
YAML
17 lines
276 B
YAML
services:
|
|
docs:
|
|
build:
|
|
context: .
|
|
target: production
|
|
dockerfile: Dockerfile
|
|
restart: unless-stopped
|
|
networks:
|
|
- caddy
|
|
labels:
|
|
caddy: ${DOMAIN}
|
|
caddy.reverse_proxy: "{{upstreams 80}}"
|
|
|
|
networks:
|
|
caddy:
|
|
external: true
|