A curated set of Docker Swarm Stacks that work with minimal configuration and minimal fuss.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

68 lines
2.2 KiB

---
version: "3.8"
services:
traefik:
image: traefik:latest
ports:
- target: 80
published: 80
protocol: tcp
mode: host
- target: 443
published: 443
protocol: tcp
mode: host
networks:
- traefik
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- traefik:/data
command:
- --accesslog
- --api
- --certificatesResolvers.acme.acme.dnschallenge=true
- --certificatesResolvers.acme.acme.dnschallenge.provider=cloudflare
- --certificatesResolvers.acme.acme.email=admin@shortcircuit.net.au
- --certificatesResolvers.acme.acme.storage=/data/acme.json
- --entrypoints.http.address=:80
- --entrypoints.http.http.redirections.entryPoint.to=https
- --entrypoints.http.http.redirections.entryPoint.scheme=https
- --entrypoints.https.address=:443
- --entrypoints.https.http.tls=true
- --entrypoints.https.http.tls.certresolver=acme
- --entrypoints.https.http.tls.domains[0].main=*.mills.io
- --entrypoints.https.http.tls.domains[0].sans=mills.io
- --entrypoints.https.http.tls.domains[1].main=*.twt.social
- --entrypoints.https.http.tls.domains[1].sans=twt.social
- --entrypoints.https.http.tls.domains[2].main=*.shortcircuit.net.au
- --entrypoints.https.http.tls.domains[2].sans=shortcircuit.net.au
- --entrypoints.https.http.tls.domains[3].main=*.twtxt.net
- --entrypoints.https.http.tls.domains[3].sans=twtxt.net
- --entrypoints.https.http.tls.domains[3].main=*.yarn.social
- --entrypoints.https.http.tls.domains[3].sans=yarn.social
- --metrics.prometheus
- --providers.docker=true
- --providers.docker.exposedbydefault=false
- --providers.docker.network=traefik
- --providers.docker.swarmmode=true
- --providers.docker.watch=true
- --providers.file.directory=/data/rules
- --providers.file.watch=true
environment:
- CLOUDFLARE_EMAIL=prologic@shortcircuit.net.au
- CLOUDFLARE_API_KEY=xxx
deploy:
endpoint_mode: dnsrr
placement:
constraints:
- "node.hostname == dm1.mills.io"
replicas: 1
networks:
traefik:
external: true
volumes:
traefik:
driver: local