fix(deploy): mount migrations into fastapi container
기존 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 검증 중 발견.
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user