fix(docker): copy migrations directory and alembic.ini into Docker image
The Docker container failed to start because the Alembic migrations directory was not being copied into the image. The init_db() function calls _run_alembic_upgrade() which requires /app/migrations to exist. Added COPY instructions for ./migrations and ./alembic.ini to both Dockerfile and Dockerfile.local. Co-authored-by: christianlouis <361235+christianlouis@users.noreply.github.com>
This commit is contained in:
@@ -33,6 +33,8 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
|
|||||||
# Copy application code
|
# Copy application code
|
||||||
COPY ./app /app/app
|
COPY ./app /app/app
|
||||||
COPY ./frontend /app/frontend
|
COPY ./frontend /app/frontend
|
||||||
|
COPY ./migrations /app/migrations
|
||||||
|
COPY ./alembic.ini /app/alembic.ini
|
||||||
COPY ./LICENSE /app/LICENSE
|
COPY ./LICENSE /app/LICENSE
|
||||||
|
|
||||||
# Copy build metadata files (generated at build time)
|
# Copy build metadata files (generated at build time)
|
||||||
|
|||||||
@@ -27,6 +27,8 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
|
|||||||
|
|
||||||
COPY ./app /app/app
|
COPY ./app /app/app
|
||||||
COPY ./frontend /app/frontend
|
COPY ./frontend /app/frontend
|
||||||
|
COPY ./migrations /app/migrations
|
||||||
|
COPY ./alembic.ini /app/alembic.ini
|
||||||
COPY ./LICENSE /app/LICENSE
|
COPY ./LICENSE /app/LICENSE
|
||||||
COPY ./VERSION /app/VERSION
|
COPY ./VERSION /app/VERSION
|
||||||
COPY ./BUILD_DATE /app/BUILD_DATE
|
COPY ./BUILD_DATE /app/BUILD_DATE
|
||||||
|
|||||||
Reference in New Issue
Block a user