Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Use requirements for docker prod build #204

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions deploy/docker/run/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,8 @@ COPY public ./public/
COPY resources ./resources/
RUN uv run pip install --quiet cython \
&& uv sync ${UV_INSTALL_ARGS} --frozen --no-install-project --no-editable \
&& uv export ${UV_INSTALL_ARGS} --frozen --no-hashes --output-file=requirements.txt
&& uv export ${UV_INSTALL_ARGS} --frozen --no-hashes --output-file=requirements.txt \
--no-emit-workspace --no-group dev --no-group test --no-group linting --no-group docs
COPY src ./src/

# build the frontend and sync the project
Expand Down Expand Up @@ -103,8 +104,10 @@ RUN addgroup --system --gid 65532 nonroot \
&& chown -R nonroot:nonroot /workspace
COPY --from=builder --chown=65532:65532 /cloudsql /cloudsql
COPY --from=builder --chown=65532:65532 /workspace/app/dist /tmp/
COPY --from=builder --chown=65532:65532 --chmod=755 /workspace/app/requirements.txt /tmp/
WORKDIR /workspace/app
RUN uv pip ${UV_INSTALL_ARGS} install --quiet --disable-pip-version-check /tmp/*.whl \
RUN uv pip ${UV_INSTALL_ARGS} install --quiet --disable-pip-version-check /tmp/*.whl --no-deps \
&& uv pip ${UV_INSTALL_ARGS} install -r /tmp/requirements.txt \
&& rm -Rf /tmp/* \
&& chown -R nonroot:nonroot /workspace/app
USER nonroot
Expand Down