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.
This commit is contained in:
Ryan Malloy 2026-02-13 03:43:09 -07:00
parent 7ffd3f1bd3
commit fb5b911ea1

View File

@ -4,6 +4,8 @@ services:
context: ./backend
dockerfile: Dockerfile
target: prod
volumes:
- notebooks:/app/notebooks
expose:
- "8000"
networks:
@ -28,6 +30,9 @@ services:
caddy: "${SPICEBOOK_DOMAIN:-spicebook.localhost}"
caddy.reverse_proxy_1: "{{upstreams 4321}}"
volumes:
notebooks:
networks:
caddy:
external: true