Skip to content

Instantly share code, notes, and snippets.

@carlosedp
Created January 19, 2018 14:35
Embed
What would you like to do?
docker-compose.yml - Traefik and Portainer
version: '2'
networks:
monitoring:
services:
traefik:
image: traefik:v1.5.0-rc5
restart: always
networks:
- monitoring
ports:
- 80:80
- 443:443
- 8080:8080
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- $PWD/traefik/:/etc/traefik/
command:
- '--configFile=/etc/traefik/traefik.toml \'
- '--logLevel=DEBUG'
portainer:
image: portainer/portainer
restart: always
networks:
- monitoring
ports:
- 9000
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- portainer_data:/data
labels:
- "traefik.backend=portainer"
- "traefik.frontend.rule=Host:portainer.cloud.mydomain.com"
- "traefik.docker.network=${COMPOSE_PROJECT_NAME}_monitoring"
- "traefik.enable=true"
- "traefik.port=9000"
- "traefik.default.protocol=http"
volumes:
portainer_data: {}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment