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

Develop docker healthchecks #1211

Open
wants to merge 73 commits into
base: develop
Choose a base branch
from

Conversation

ninjamonkey198206
Copy link

Added healthchecks to the docker-compose file for nginx, redis, postgres, and mongodb

docker/docker-compose.yml Show resolved Hide resolved
@codecov
Copy link

codecov bot commented Jul 17, 2022

Codecov Report

Merging #1211 (bf68d12) into develop (9f2f23f) will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff            @@
##           develop    #1211   +/-   ##
========================================
  Coverage    81.43%   81.43%           
========================================
  Files          116      116           
  Lines         7747     7747           
========================================
  Hits          6309     6309           
  Misses        1438     1438           
Impacted Files Coverage Δ
api/tacticalrmm/tacticalrmm/utils.py 66.93% <ø> (ø)

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@ninjamonkey198206
Copy link
Author

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.

@ninjamonkey198206
Copy link
Author

ninjamonkey198206 commented Aug 5, 2022

@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...

@CLAassistant
Copy link

CLAassistant commented Nov 19, 2022

CLA assistant check
All committers have signed the CLA.

@@ -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" ]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
test: [ "CMD", "pg_isready", "-U", "tactical", "-d", "tacticalrmm" ]
test: [ "CMD", "pg_isready", "-U", "$$POSTGRES_USER", "-d", "$$POSTGRES_DB" ]

Maybe use env's here?

@wh1te909 wh1te909 force-pushed the develop branch 2 times, most recently from 942055f to 903a2d6 Compare June 25, 2023 02:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants