From d5f91556e67e6f6093a5a7470c61210e1d673d42 Mon Sep 17 00:00:00 2001 From: Hyungi Ahn Date: Thu, 9 Apr 2026 07:53:22 +0900 Subject: [PATCH] fix(deploy): mount migrations into fastapi container MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 기존 fastapi build context는 ./app이라 부모 디렉토리의 migrations/가 컨테이너에 들어가지 않아 init_db()의 _run_migrations가 디렉토리 부재로 스킵. 016까지는 postgres docker-entrypoint-initdb.d 마운트로 첫 init 시점에만 적용되었고, 이후 추가된 마이그레이션(101 등)이 자동 적용되지 못하는 문제. ./migrations:/app/migrations:ro 한 줄 마운트로 init_db()가 100+ 마이그레이션 추적 + 적용 가능. Phase 4 deploy 검증 중 발견. --- docker-compose.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/docker-compose.yml b/docker-compose.yml index 99deb58..36f0bd1 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -89,6 +89,7 @@ services: - ./config.yaml:/app/config.yaml:ro - ./scripts:/app/scripts:ro - ./logs:/app/logs + - ./migrations:/app/migrations:ro depends_on: postgres: condition: service_healthy