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

💡 [Feature] Avoid runtime installation of CanarieAPI dependencies #322

Open
fmigneault opened this issue Apr 20, 2023 · 0 comments
Open
Assignees
Labels
enhancement New feature or request

Comments

@fmigneault
Copy link
Member

Description

To avoid rate-limiting from GitHub/DockerHub requests when retrieving tags and their release times, CanarieAPI uses requests-cache package to limit the amount of requests it performs (basically each time the configs are loaded otherwise).

pip install requests-cache
# chain existing cmd
exec /bin/sh -c "\
env >> /etc/environment && \
cron && \
nginx && \
gunicorn -b 0.0.0.0:2000 --workers 1 --log-level=DEBUG --timeout 30 -k gevent canarieapi.wsgi \
"

This is a quick workaround, but runtime installation reduces reproductibility of the obtained image.
However, the package is not itself employed in CanarieAPI in other circumstances, as no caching is actually applied on performed requests by CanarieAPI, since its goal is to retrieve up-to-date statuses of monitored services each time.

A potential fix would be to pin the installed version.

References

Concerned Organizations

  • all using CanarieAPI
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants