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 cache issue in docker builds #2639

Open
wants to merge 2 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
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
4 changes: 2 additions & 2 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -103,8 +103,8 @@ jobs:
build-args: |
APP_VERSION=${{ github.sha }}
ADDITIONAL_PLUGS=${{ env.ADDITIONAL_PLUGS }}
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max
cache-from: type=gha
cache-to: type=gha,mode=max
shauryag2002 marked this conversation as resolved.
Show resolved Hide resolved

- name: Create Sentry release
uses: getsentry/action-release@v1
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/reusable-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@ jobs:
with:
load: true
set: |
*.cache-from=type=local,src=/tmp/.buildx-cache
*.cache-to=type=local,dest=/tmp/.buildx-cache-new
*.cache-from=type=gha
*.cache-to=type=gha,mode=max
shauryag2002 marked this conversation as resolved.
Show resolved Hide resolved
files: docker-compose.yaml,docker-compose.local.yaml
env:
DOCKER_BUILD_SUMMARY: false
Expand Down
4 changes: 2 additions & 2 deletions docker/prod.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -47,11 +47,11 @@ RUN pip install pipenv==2024.4.0

RUN python -m venv $APP_HOME/.venv
COPY Pipfile Pipfile.lock $APP_HOME/
RUN pipenv install --deploy --categories "packages"
RUN --mount=type=cache,target=/root/.cache/pip pipenv install --deploy --categories "packages"

COPY plugs/ $APP_HOME/plugs/
COPY install_plugins.py plug_config.py $APP_HOME/
RUN python3 $APP_HOME/install_plugins.py
RUN --mount=type=cache,target=/root/.cache/pip python3 $APP_HOME/install_plugins.py

# ---
FROM base AS runtime
Expand Down