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.
39 lines
761 B
YAML
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
|