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

Healthcheck in NordVPN container #27

Closed
flipyou opened this issue Apr 2, 2019 · 3 comments
Closed

Healthcheck in NordVPN container #27

flipyou opened this issue Apr 2, 2019 · 3 comments

Comments

@flipyou
Copy link

flipyou commented Apr 2, 2019

I have several containers which depend on the NordVPN container to have a successful connection and the network all set up. If they start too quickly sometimes I have to restart them after NordVPN is running. This means that on a reboot I can't rely on all my containers simply working.

Could you include code in the container for a Healthcheck? This would allow me to use Healthcheck code in my docker-compose file to stop containers if the VPN is dropped or not not yet ready, and to restart containers when the VPN is up again.

I considered writing a bunch of scripts to start and stop various containers at the right times, but incorporating Healthcheck would be much simpler.

here's a link to the documentation https://docs.docker.com/engine/reference/builder/#healthcheck

@bubuntux
Copy link
Owner

bubuntux commented Apr 2, 2019

The image used to have the helthcheck i removed because is actually checking if the connection is up and not necessarily if the service is up, there's a small diff there. i haven't find a proper healthcheck that i like.

Anyway you can manually add one thought command line or docker-compose to fulfill your needs

please consider creating merge request with a heatlcheck if you find one generic enough, thanks!

@bubuntux bubuntux closed this as completed Apr 2, 2019
@bubuntux
Copy link
Owner

bubuntux commented Apr 2, 2019

also.. is just setup using docker-compose?
if so i believe the dependent components will wait until the nordvpn container is up and ready

@stickystyle
Copy link

FYI - this is the healthcheck I use in my docker-compose, it just checks if the tunnel is up; better than nothing I suppose.

    healthcheck:
      test: "ifconfig | grep ^tun0 > /dev/null"
      interval: 15s
      timeout: 1s

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

No branches or pull requests

3 participants