Reputation: 756
I moved my nginx instance to a docker container, I want to monitor that container (or service within it) and be able to launch a new container in case the server restarts or any other issue.
So far what I did to monitor the nginx service in the container, was to add in my consul monitoring a health check, and it is fine (I read a bit about service discovery with consul, no sure if that is the way) but if the container stops I want something to help me to launch a new container.
I have no docker-swarm, kubernetes or other similar orchestrator solution, but I was thinking on some script to use the command docker run -d -p 80:80 -p 1090:1090 -v /etc/nginx/conf.d:/etc/nginx/conf.d nginx
.
Any ideas and advices are welcome, thanks.
Upvotes: 1
Views: 1576