diff --git a/server/Dockerfile b/server/Dockerfile index 6fdec73..fa25d4d 100644 --- a/server/Dockerfile +++ b/server/Dockerfile @@ -48,17 +48,19 @@ RUN --mount=type=cache,target=/var/cache/apk \ WORKDIR /build -COPY server/pyproject.toml server/README.md server/requirements.txt ./ -COPY server/src/ ./src/ -# aerich migration files are a release artifact: the db-migrate compose -# service runs `aerich upgrade` from this image before the app starts. -COPY server/migrations/ ./migrations/ +COPY server/requirements.txt ./ RUN --mount=type=cache,target=/root/.cache/pip \ python3 -m venv /opt/venv \ && /opt/venv/bin/pip install --upgrade pip \ && /opt/venv/bin/pip install -r requirements.txt . +COPY server/pyproject.toml server/README.md ./ +COPY server/src/ ./src/ +# aerich migration files are a release artifact: the db-migrate compose +# service runs `aerich upgrade` from this image before the app starts. +COPY server/migrations/ ./migrations/ + # --- Runtime --------------------------------------------------------------- FROM alpine:3.24