Deploy multiple containerized web apps in the same Server (VPS, ...) using Docker and NGINX as a reverse proxy. This will automatically route the requests to the containers and manage (create, generate and renew) the Let's encrypt SSL certificates.
nginx-proxy
is a containerized NGINX reverse proxy.portainer
is a web-based tool to manage containers.demo
is a web example.
-
Install Docker in your server (Official docs)
-
Make docker run at startup of the OS
sudo systemctl enable docker
-
Install docker-compose (Official Docs)
-
Create a Docker network
docker network create auto-reverse-proxy-global-network
-
Configure env variables in each folder
cd $FOLDER_NAME cp .env.example .env nano .env
-
Start the reverse-proxy
cd ./nginx-proxy docker-compose up -d
to stop the reverse-proxy run
cd ./nginx-proxy docker-compose down
-
Run portainer
cd ./portainer docker-compose up -d
to stop portainer run
cd ./portainer docker-compose down
See Customize nginx reverse proxy for more details.
Pull requests are welcome. For any bug report, please create an issue on GitHub.
Based on nginx-proxy , acme-companion and portainer .