Skip to content

Instantly share code, notes, and snippets.

@austinfrey
Created April 10, 2017 16:15
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save austinfrey/3bb203663cbf367353eb38841c81b89e to your computer and use it in GitHub Desktop.
Save austinfrey/3bb203663cbf367353eb38841c81b89e to your computer and use it in GitHub Desktop.
version: "3"
services:
# Traefik setup
traefik:
image: traefik:latest
command: -c --docker=true
--docker.swarmmode=true
--docker.domain=traefik
--docker.watch=true
--web=true
--debug=true
--defaultEntryPoints='http,https'
--acme=true
--acme.domains='yourdomain.co,www.yourdomain.co'
--acme.email=youremail@gmail.com
--acme.ondemand=true
--acme.onhostrule=true
--acme.storage=/etc/traefik/acme/acme.json
--acme.entryPoint=https
--entryPoints='Name:https Address::443 TLS'
--entryPoints='Name:http Address::80'
ports:
- 80:80
- 443:443
- 8080:8080
volumes:
- "/var/run/docker.sock:/var/run/docker.sock"
- "acme:/etc/traefik/acme"
networks:
- traefik-net
deploy:
placement:
constraints: [node.role == manager]
minio:
image: minio/minio:RELEASE.2017-03-16T21-50-32Z
volumes:
- minio-data:/export
networks:
- traefik-net
environment:
MINIO_ACCESS_KEY: YOURMINIOACCESSKEY
MINIO_SECRET_KEY: YOURMINIOSECRETKEY
deploy:
labels:
- traefik.port=9000
- traefik.frontend.rule=Host:yourdomain.co
restart_policy:
delay: 10s
max_attempts: 10
window: 60s
command: server /export
registry:
image: registry:2
volumes:
- /home/user/config.yml:/etc/docker/registry/config.yml
networks:
- traefik-net
deploy:
labels:
- traefik.port=5000
- traefik.frontend.rule=Host:www.yourdomain.co
networks:
traefik-net:
driver: overlay
@trajano
Copy link

trajano commented Jul 6, 2018

Is this affected by traefik/traefik#988 ?

Would it have issues with multiple replicas of traefik?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment