Report this

What is the reason for this report?

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

Posted on March 28, 2017

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)



This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

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

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.

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Get started for free

Sign up and get $200 in credit for your first 60 days with DigitalOcean.*

*This promotional offer applies to new accounts only.