A configuration set-up for a Traefik v2 reverse proxy along with Portainer and Docker Compose.
This set-up makes container management & deployment a breeze and the reverse proxy allows for running multiple applications on one Docker host. Traefik will route all the incoming traffic to the appropriate docker containers and through the open-source app Portainer you can speed up software deployments, troubleshoot problems and simplify migrations.
Detailed explanation how to use this in my blog post: Docker container management with Traefik v2 and Portainer
add docker network
docker network create traefik-proxy
core/docker-compose.yml
- change
traefik.YOURDOMAIN.com
andportainer.YOURDOMAIN.com
volumes/traefik/traefik.yml
change
certificatesResolvers:
letsencrypt:
acme:
email: [email protected]
volumes/traefik/acme.json
sudo chmod 600 acme.json
https://www.web2generators.com/apache-tools/htpasswd-generator
volumes/traefik/configurations/dynamic.yml
change
user-auth:
basicAuth:
users:
- "NEW_AUTH_STRING"
$ git clone [email protected]:ame1973/docker-traefik-portainer.git
$ cd docker-traefik-portainer/core
# update setting
$ docker-compose up -d
auto deploy script
curl -s -H 'Pragma: no-cache' https://raw.githubusercontent.com/ame1973/docker-traefik-portainer/master/all_in_one_setup.sh?_=$(date +%s) | sudo bash -s {{PANEL_BASE_DOMAIN}} {{TRAEFIK_PASSWORD}} {{PANEL_USERNAME}} {{SSH_EMAIL}}