Repository navigation
Add HEALTHCHECK and hadolint - #285
Conversation
|
@llaumgui Thanks for this. I tested the HEALTHCHECK in a container and it comes back unhealthy on a healthy server. It's in exec form, so there's no shell: the |, grep and || get passed to curl as URLs and it exits 3 with "Could not resolve host: |". That would flag every Tome container as unhealthy. The Docker job doesn't run on PRs, so CI couldn't catch it. The grep isn't needed anyway, curl -f already fails on anything but a 2xx and the endpoint can only answer ok. I'd also rather not add curl to the image just for this, python is already there. This works (tested): HEALTHCHECK --interval=30s --timeout=5s --start-period=20s If you update the PR to that and drop the curl install, I'll merge it. On hadolint I'll pass. With six rules ignored it doesn't tell us much, and I don't want another gate in front of the image build on main. |
|
Sorry for the mistake, I got confused between my local tests and some fixes I applied afterward. Regarding I have removed Hadolint from GitHub Actions, but left the .hadolint.yaml file with fewer exclusions. If you use the Hadolint plugin in VS Code (for example), you will still be able to view issues. |
|
Looks good, tested the new probe against the 2.8.0 image and it behaves correctly (0 on ok, 1 on no port and on 404). Merging this and #287, thanks for compromising on the changes! 👍 |
Summary
Add curl and HEALTHCHECK feature on Dockerfile.
Add a hadolint test in action to check Dockerfile compliance.
Changes
Backend
Frontend
Screenshots
Checklist
pytestpassesnpm run buildclean (frontend typecheck)Notes
By submitting this PR, I confirm my contributions are licensed under AGPL-3.0.