From b0e9040779c9d71f91508ace6439e5f5ebcaa629 Mon Sep 17 00:00:00 2001 From: lchen-2101 <73617864+lchen-2101@users.noreply.github.com> Date: Wed, 29 Nov 2023 17:07:53 -0500 Subject: [PATCH] feat: update Dockerfile to integrate alembic --- Dockerfile | 9 ++++++--- Dockerfile.mac_chip | 9 ++++++--- 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/Dockerfile b/Dockerfile index 1cb663a..daa34a0 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,15 +1,18 @@ FROM python:3.11-alpine -WORKDIR /usr/src/app +WORKDIR /usr/app RUN pip install poetry -COPY poetry.lock pyproject.toml ./ +COPY poetry.lock pyproject.toml alembic.ini ./ RUN poetry config virtualenvs.create false RUN poetry install --no-root -COPY ./src ./ +COPY ./src ./src +COPY ./db_revisions ./db_revisions + +WORKDIR /usr/app/src EXPOSE 8888 diff --git a/Dockerfile.mac_chip b/Dockerfile.mac_chip index 0b13f51..de3cf8e 100644 --- a/Dockerfile.mac_chip +++ b/Dockerfile.mac_chip @@ -2,7 +2,7 @@ FROM python:3.11-alpine -WORKDIR /usr/src/app +WORKDIR /usr/app RUN apk add --update --no-cache --virtual .tmp-build-deps \ gcc libc-dev linux-headers postgresql-dev \ @@ -10,12 +10,15 @@ RUN apk add --update --no-cache --virtual .tmp-build-deps \ RUN pip install poetry -COPY poetry.lock pyproject.toml ./ +COPY poetry.lock pyproject.toml alembic.ini ./ RUN poetry config virtualenvs.create false RUN poetry install --no-root -COPY ./src ./ +COPY ./src ./src +COPY ./db_revisions ./db_revisions + +WORKDIR /usr/app/src EXPOSE 8888