-
-
Notifications
You must be signed in to change notification settings - Fork 450
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
Develop docker healthchecks #1211
base: develop
Are you sure you want to change the base?
Develop docker healthchecks #1211
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## develop #1211 +/- ##
========================================
Coverage 81.43% 81.43%
========================================
Files 116 116
Lines 7747 7747
========================================
Hits 6309 6309
Misses 1438 1438 ☔ View full report in Codecov by Sentry. |
Unfortunately I think this will have to be done in stages, as I'm having trouble getting nats and mesh to play nice for testing. |
@sadnub the nginx one clued me into the issue with the duplicate nginx.conf entry that was going around, and gives a heads-up if the containers go funky, which I've noticed happens sometimes after a host system reboot. The nginx container would be running, and everything else would show as up and running, but nothing would work. The simple health check here would then show the nginx container as running, but not healthy. I'm sure there are more in-depth methods, but I think this would be a good start. I think I saw a monitoring URL somewhere, in fact... |
@@ -30,6 +30,12 @@ services: | |||
POSTGRES_DB: tacticalrmm | |||
POSTGRES_USER: ${POSTGRES_USER} | |||
POSTGRES_PASSWORD: ${POSTGRES_PASS} | |||
healthcheck: | |||
test: [ "CMD", "pg_isready", "-U", "tactical", "-d", "tacticalrmm" ] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
test: [ "CMD", "pg_isready", "-U", "tactical", "-d", "tacticalrmm" ] | |
test: [ "CMD", "pg_isready", "-U", "$$POSTGRES_USER", "-d", "$$POSTGRES_DB" ] | |
Maybe use env's here?
942055f
to
903a2d6
Compare
Added healthchecks to the docker-compose file for nginx, redis, postgres, and mongodb