Permalink
Branch: master
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
69 lines (62 sloc) 1.73 KB
# simple proxy example using traefik single container
# for a more full-featured solution with multi-node proxy,
# HA, consul backend, and more, see stack-proxy-global.yml
version: '3.7'
x-default-opts:
&default-opts
logging:
options:
max-size: "1m"
# driver: "gelf"
# options:
# gelf-address: "udp://127.0.0.1:5000"
services:
traefik:
<<: *default-opts
image: traefik:1.7-alpine
networks:
- proxy
volumes:
- acme:/etc/traefik/acme
- /var/run/docker.sock:/var/run/docker.sock
ports:
- "80:80"
- "443:443"
- "8080:8080" # traefik dashboard
command:
# Use your favourite settings here, but add:
- --docker
- --docker.swarmMode
- --docker.domain=traefik
- --docker.network=proxy
- --docker.watch
- --api
- --defaultentrypoints=http,https
# - --acme
# - --acme.email=${TRAEFIK_ACME_EMAIL}
# # TODO: envvar for email and default domain
# - --acme.httpchallenge
# - --acme.httpchallenge.entrypoint=http
# - --acme.onhostrule=true
# - --acme.entrypoint=https
# - --entryPoints=Name:https Address::443 TLS
# - --entryPoints=Name:http Address::80
# - --acme.storage=/etc/traefik/acme/acme.json
# - --acme.acmelogging
# - --acme.caserver=https://acme-staging-v02.api.letsencrypt.org/directory
# - --acme.caserver=https://acme-v02.api.letsencrypt.org/directory
deploy:
placement:
constraints: [node.role == manager]
labels:
- traefik.port=8080
- traefik.frontend.rule=Host:traefik.dogvs.cat
volumes:
acme:
driver: rexray/dobs
driver_opts:
size: 1
networks:
proxy:
driver: overlay
name: proxy