From 71a2fc5b516e4db5eab53df5d99789154125b9fc Mon Sep 17 00:00:00 2001 From: Giorgio Gilestro Date: Mon, 25 May 2026 12:49:27 +0200 Subject: [PATCH] deploy: mount app/ + alembic from host in base compose MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- docker-compose.yml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/docker-compose.yml b/docker-compose.yml index 3038c98..8a7e03f 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -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