Skip to content

Commit

Permalink
enhancement: changes to Dockerfile to build with checksum
Browse files Browse the repository at this point in the history
  • Loading branch information
Songmin17 committed Nov 24, 2023
1 parent 25013dd commit 8522973
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .github/workflows/docker_build_push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:
echo "Checksum file retrieved successfully."
else
echo "Checksum file not found in Docker image. Create a dummy checksum file."
echo "dummychecksum" > filename.txt
echo "dummychecksum" > container_checksum.txt
if ! cmp -s code_checksum.txt container_checksum.txt; then
echo "Checksums do not match, proceed with build and pull."
Expand Down
3 changes: 3 additions & 0 deletions backend/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ WORKDIR /app
COPY requirements.txt requirements.txt
RUN pip install --no-cache-dir -r requirements.txt

# Generate and store the checksum
RUN find /app/ -type f -exec sha256sum {} + > app_checksum.txt

COPY . .

CMD ["gunicorn", "haengsha.wsgi:application", "--bind", "0.0.0.0:8000"]

0 comments on commit 8522973

Please sign in to comment.