-
Notifications
You must be signed in to change notification settings - Fork 340
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 dev docker file and enable sql logging #2649
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -31,9 +31,9 @@ RUN ARCH=$(dpkg --print-architecture) && \ | |
rm -rf typst.tar.xz typst-${TYPST_ARCH} | ||
|
||
# use pipenv to manage virtualenv | ||
RUN pip install pipenv==2024.4.0 | ||
|
||
RUN python -m venv /.venv | ||
RUN --mount=type=cache,target=/root/.cache/pip pip install pipenv==2024.4.0 | ||
|
||
Comment on lines
+35
to
+36
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 💡 Codebase verification Looks like we found a lonely pip install without cache in prod.Dockerfile The build cache optimization is only implemented in dev.Dockerfile but not in prod.Dockerfile. For consistency and build performance, the same cache mount should be added to the pip install command in prod.Dockerfile as well.
🔗 Analysis chainFinally, someone remembered that build caches exist! Nice optimization using Let's check if we're consistent with cache usage across our Dockerfiles: 🏁 Scripts executedThe following scripts were executed for the analysis: Script: #!/bin/bash
# Check other Dockerfiles for potential cache optimization opportunities
fd Dockerfile | while read -r file; do
echo "=== $file ==="
rg "pip install" "$file"
done
Length of output: 392 |
||
COPY Pipfile Pipfile.lock $APP_HOME/ | ||
RUN --mount=type=cache,target=/root/.cache/pip pipenv install --system --categories "packages dev-packages docs" | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💡 Codebase verification
Would be lovely if we could add documentation for the ENABLE_SILK environment variable
The local setup documentation in
docs/local-setup/configuration.rst
seems to be missing any mention of this rather important development feature. Since developers might want to use Django Silk for profiling, it would be quite helpful to document this configuration option alongside other environment variables.ENABLE_SILK
environment variable indocs/local-setup/configuration.rst
, perhaps under the development environment setup section🔗 Analysis chain
Documentation update might be nice.
Since this introduces a new environment variable that affects development workflow, it would be absolutely wonderful if we could document this change in the development setup guide.
Let's check if there's a relevant documentation file:
🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
Length of output: 421
Script:
Length of output: 5087