dfofie
By:
dfofie

Nginx in Production as a reverse proxy: Docker or bare instance

March 28, 2017 597 views
Nginx Docker CentOS

Hello @all,

I am running Nginx as a reverse Proxy for my multiple applications.
Actually nginx is running inside a Docker container with a --restart=always Tag. I'm not very sure if it's a good idea to run like this in production.

Would you recommend me to install Nginx on the server itself? With yum install ? Or will you recommend me to continue with the Docker instance.

I really appreciate the way Docker works but if its appear that Docker containers are unstable, it will not be dramatic to kill the container an install it on my Bare Meta Server directly.

Regads.
(Sorry for my english, Hope the question is understandable)

2 Answers

I use nginx as a reverse proxy on several projects and I don't think that you should see any major difference in reliability or performance between running nginx on the host system or in a docker container. If you are using docker to ease deployment or isolate services, go for it. Having your reverse proxy dockerized would likely also make it easier to scale in the future since you can easily deploy more web nodes to a load balanced cluster.

I am using nginx proxy for a while in production and had no problem at all. In fact had to change server last few days and it was faster and hady to get everything up and running in the new server. Also had some compose file to help:

https://github.com/evertramos/docker-compose-letsencrypt-nginx-proxy-companion

Have another answer? Share your knowledge.