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:
parent
5c7cc4c6aa
commit
71a2fc5b51
1 changed files with 9 additions and 0 deletions
|
|
@ -43,6 +43,12 @@ services:
|
||||||
REDIS_URL: redis://redis:6379/0
|
REDIS_URL: redis://redis:6379/0
|
||||||
volumes:
|
volumes:
|
||||||
- ./config:/app/config:ro
|
- ./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:
|
depends_on:
|
||||||
db:
|
db:
|
||||||
condition: service_healthy
|
condition: service_healthy
|
||||||
|
|
@ -62,6 +68,9 @@ services:
|
||||||
REDIS_URL: redis://redis:6379/0
|
REDIS_URL: redis://redis:6379/0
|
||||||
volumes:
|
volumes:
|
||||||
- ./config:/app/config:ro
|
- ./config:/app/config:ro
|
||||||
|
- ./app:/app/app
|
||||||
|
- ./alembic:/app/alembic
|
||||||
|
- ./alembic.ini:/app/alembic.ini:ro
|
||||||
depends_on:
|
depends_on:
|
||||||
db:
|
db:
|
||||||
condition: service_healthy
|
condition: service_healthy
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue