Skip to content

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

@fmigneault

Description

@fmigneault

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

Metadata

Metadata

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions