On this tutorial, you’ll study to put in and configure Docker, Docker-compose, the Portainer container administration resolution on a Linux server and use it to create and handle Docker containers to run completely different apps. Additionally, you will study to place these containers behind Nginx utilizing the Nginx proxy supervisor.The Nginx proxy supervisor (NPM) is a reverse proxy administration system working on Docker. NPM relies on an Nginx server and offers customers with a clear, environment friendly, and exquisite internet interface for simpler administration.
Set up Docker & Docker-Compose
apt set up docker.io -y && apt set up docker-compose
curl -sSL https://get.docker.com/ | sh systemctl begin docker systemctl allow docker
curl -L "https://get.daocloud.io/docker/compose/releases/obtain/1.29.2/docker-compose-$(uname -s)-$(uname -m)" -o /usr/native/bin/docker-compose chmod +x /usr/native/bin/docker-compose
ln -s /usr/native/bin/docker-compose /usr/bin/docker-compose
Set up Portainer
Instructions to put in Portainer:
[[email protected] ~]# docker quantity create portainer_data portainer_data [[email protected] ~]# docker run -d -p 9000:9000 --name portainer --restart at all times -v /var/run/docker.sock:/var/run/docker.sock -v portainer_data:/information portainer/portainer-ce:newest
- Be certain that your VPS’s 9000 port has been opened.
Confirm Portainer from Web by visiting http://<VPS’s Public IP>:9000
- Set up Docker and Docker-Compose
- Create a docker-compose.yml file just like this:
- Carry up your stack by working
- Log in to the Admin UI
When your docker container is working, connect with it on port
81 for the admin interface. Typically this may take a little bit bit due to the entropy of keys.
Default Admin Person:
Instantly after logging in with this default person you may be requested to switch your particulars and alter your password
Log in and alter password.
Open the URL
https://<yourserverIP>:81 in your browser, and you’re going to get the next display screen. Enter the next default credentials to check in.
Electronic mail deal with:
[email protected] Password: changeme
Subsequent, you may be instantly requested to set a reputation and an electronic mail deal with. Click on the Save button, and you may be requested to create a brand new password. Click on the Save button once more to get began.
Go to the Hosts >> Proxy Hosts and click on the Add Proxy Host button.
Enter the area title as
portainer.instance.com. Select the scheme as
https. Enter the title of the container because the Ahead Hostname and 9443 because the Ahead port. Examine the choices Block Widespread Exploits and Websockets Assist choices.
Configure NPM for Portainer
Configure NPM for NPM