deploy: mount app/ + alembic from host in base compose

Lets a plain \`docker compose restart app\` pick up code edits without
an image rebuild. Image still bakes a copy at build time as a fallback.
Note: base compose is applied in prod too, so this affects the live
deploy — intentional, since this host edits live.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
Giorgio Gilestro 2026-05-25 12:49:27 +02:00
parent 5c7cc4c6aa
commit 71a2fc5b51

View file

@ -43,6 +43,12 @@ services:
REDIS_URL: redis://redis:6379/0
volumes:
- ./config:/app/config:ro
# Mount app code + migrations from the host so edits take effect
# on a plain `docker compose restart app` — no image rebuild.
# Image still bakes a copy at build time as a fallback.
- ./app:/app/app
- ./alembic:/app/alembic
- ./alembic.ini:/app/alembic.ini:ro
depends_on:
db:
condition: service_healthy
@ -62,6 +68,9 @@ services:
REDIS_URL: redis://redis:6379/0
volumes:
- ./config:/app/config:ro
- ./app:/app/app
- ./alembic:/app/alembic
- ./alembic.ini:/app/alembic.ini:ro
depends_on:
db:
condition: service_healthy