spicebook/docker-compose.prod.yml
Ryan Malloy fb5b911ea1 Use named volume for notebooks in production
Bind mounts inherit host UID which conflicts with the container's
non-root user. Named volumes are initialized from the image layer,
preserving the chown from the Dockerfile.
2026-02-13 03:43:09 -07:00

39 lines
761 B
YAML

services:
backend:
build:
context: ./backend
dockerfile: Dockerfile
target: prod
volumes:
- notebooks:/app/notebooks
expose:
- "8000"
networks:
- default
- caddy
labels:
caddy: "${SPICEBOOK_DOMAIN:-spicebook.localhost}"
caddy.@api.path: "/api/* /health /docs /openapi.json /redoc"
caddy.reverse_proxy_0: "@api {{upstreams 8000}}"
frontend:
build:
context: ./frontend
dockerfile: Dockerfile
target: prod
expose:
- "4321"
networks:
- default
- caddy
labels:
caddy: "${SPICEBOOK_DOMAIN:-spicebook.localhost}"
caddy.reverse_proxy_1: "{{upstreams 4321}}"
volumes:
notebooks:
networks:
caddy:
external: true