Skip to content

Commit

Permalink
fix of venv in entrypoint.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
david-i-berry committed Aug 19, 2024
1 parent e2fd336 commit ecc645a
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/test-docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ jobs:
# cat file contents (check the published file has been downloaded)
cat "./data/downloads/$(date +'%Y')/$(date +'%m')/$(date +'%d')/cache/a/wis2/my-centre/services/downloader/openapi.bin"
# test deleting subscriptions
docker exec subscriber wis2downloader remove-subscription --topic cache/a/wis2/+/services/#
docker exec subscriber wis2downloader remove-subscription --topic cache/a/wis2/+/services/#
- name: Run API tests
working-directory: docker/tests
run: |
Expand Down
4 changes: 2 additions & 2 deletions docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ ENV USER_ID 1001
# Update / upgrade
RUN apt-get update && \
apt-get upgrade && \
apt-get install -y gettext-base=0.21-12 curl=7.88.1-10+deb12u6 cron
apt-get install -y gettext-base=0.21-12 curl=7.88.1-10+deb12u6 cron=3.0pl1-162


# Now setup python env and default user
Expand Down Expand Up @@ -65,4 +65,4 @@ HEALTHCHECK --interval=1m --timeout=3s \
CMD curl -f http://localhost:5000/subscriptions || exit 1

# Run wis2downloader when the container launches
CMD ["/bin/bash", "-c", "source .venv/bin/activate && gunicorn --bind 0.0.0.0:5000 --workers 1 wis2downloader.app:app"]
CMD ["/bin/bash", "-c", "gunicorn --bind 0.0.0.0:5000 --workers 1 wis2downloader.app:app"]
3 changes: 2 additions & 1 deletion docker/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -25,5 +25,6 @@ fi
# print the config
echo "Config:"
cat /home/wis2downloader/app/config/config.json

# activate python env
source /home/wis2downloader/.venv/bin/activate
exec "$@"

0 comments on commit ecc645a

Please sign in to comment.