Skip to content

Commit

Permalink
Disable caching for Dockerfile in docker-compose.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
Mega-JC committed Jul 27, 2024
1 parent c624721 commit 8c78bf4
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/deploy-to-vps.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,5 +25,6 @@ jobs:
cd ~/PygameCommunityBot
docker compose stop
docker compose rm -f
sleep 60 && docker compose build --no-cache && docker compose up -d
sleep 60
docker compose up -d --build
docker image prune -af
4 changes: 3 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ RUN apt-get update \

COPY ./pyproject.toml ./requirements.txt ./

FROM builder-base AS pipinstall

RUN mkdir $VENV_PATH \
&& python -m venv $VENV_PATH \
&& . $VENV_PATH/bin/activate \
Expand All @@ -29,7 +31,7 @@ RUN mkdir $VENV_PATH \

FROM python-base AS runtime

COPY --from=builder-base $VENV_PATH $VENV_PATH
COPY --from=pipinstall $VENV_PATH $VENV_PATH

COPY ./docker-entrypoint.sh /docker-entrypoint.sh
RUN chmod +x /docker-entrypoint.sh
Expand Down
1 change: 1 addition & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ services:
build:
context: .
dockerfile: Dockerfile
no_cache: true
tty: true
volumes:
- /mnt/blockstorage:/mnt/blockstorage

0 comments on commit 8c78bf4

Please sign in to comment.