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

Update revision.txt when building images #1059

Merged
merged 1 commit into from
Jul 2, 2019
Merged
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,6 @@ RUN /bin/bash -c 'if ${DEVELOPMENT}; then pip install -r requirements-dev.txt; f

COPY . /app
RUN DEBUG=False SECRET_KEY=foo ALLOWED_HOSTS=localhost, DATABASE_URL=sqlite:/// SITE_URL= ./manage.py collectstatic --noinput
RUN bash -c "if [[ -e revision.txt ]]; then mv revision.txt static/; fi"
RUN chown webdev.webdev -R .
USER webdev
ENV GIT_SHA $GIT_COMMIT
1 change: 1 addition & 0 deletions bin/build_images.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,6 @@ function imageExists() {
}

if ! imageExists; then
echo $GIT_COMMIT > revision.txt
docker build -t "$DOCKER_IMAGE_TAG" --pull .
fi
2 changes: 0 additions & 2 deletions bin/run-prod.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,4 @@

./bin/run-common.sh

echo "$GIT_SHA" > static/revision.txt

exec gunicorn snippets.wsgi.app --config snippets/wsgi/config.py