Last updated
Was this helpful?
Last updated
Was this helpful?
is a reverse proxy and load balancing solution focused on micro services.
To deploy Portainer behind Traefik Proxy in a Docker standalone scenario you must use a Docker Compose file. In the following docker-compose.yml
you will find the configuration for Portainer Traefik with SSL support and the Portainer Server.
Before you run this file in Docker, you will need to create the acme.json
file with permission 600
that will store the SSL certificates. Once it has been created, you can define the file path in the following sections in the Docker Compose file:
In the volumes and command section of the Traefik Proxy container:
You also need to enter your email address for Let's Encrypt registration.
Next, customize some labels in the Traefik container. The following labels need to be updated with the URL that you want use to access Portainer:
Once this is done, you're ready to deploy Portainer:
After the images have been downloaded and deployed you will able to access Portainer from the URL you defined earlier, for example: https://portainer.yourdomain.com
.
To deploy Portainer behind Traefik Proxy in a Docker Swarm scenario you must use a Docker Compose file. In the following docker-compose.yml
you will find the configuration for Portainer Traefik with SSL support and the Portainer Server.
Before deploying the Docker Compose file, you need to create two elements: networks and volumes.
First, create two overlay networks:
Then create the volume:
Save this recipe as portainer.yml
:
Finally, customize these labels to match the URL that you want to use to access Portainer:
You can now deploy Portainer by executing the following:
To check the deployment, run docker service ls
. You should see an output similar to the following:
Once the services are running, you will able to access Portainer from the URL you defined earlier, for example: portainer.yourdomain.com
.
This deployment assumes you are running one manager node. If you are using multiple managers we advise before proceeding.