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

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)

Submit an answer

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!

Sign In or Sign Up to Answer

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.

Want to learn more? Join the DigitalOcean Community!

Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.

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: