Attempt to seprate configs to match env

This commit is contained in:
Luke Murphy
2020-04-30 11:17:45 +02:00
parent 5ef399f969
commit 99400dd672
5 changed files with 65 additions and 32 deletions

View File

@ -1,46 +1,15 @@
---
version: "3.3"
version: "3.8"
services:
traefik:
image: "traefik:v2.2"
restart: always
container_name: traefik
ports:
- "80:80"
- "443:443"
- "8080:8080"
volumes:
- "/var/run/docker.sock:/var/run/docker.sock"
- "letsencrypt:/etc/letsencrypt"
configs:
- source: traefik-yml
target: /etc/traefik/traefik.yml
networks:
- proxy
deploy:
mode: replicated
replicas: 1
placement:
constraints:
- node.role == manager
labels:
- "traefik.enable=true"
- "traefik.http.services.traefik.loadbalancer.server.port=80"
- "traefik.http.routers.traefik.rule=Host(`traefik.swarm.autonomic.zone`)"
- "traefik.http.routers.traefik.entrypoints=web-secure"
- "traefik.http.routers.traefik.tls.certresolver=staging"
- "traefik.http.routers.traefik.service=api@internal"
- "traefik.http.routers.traefik.middlewares=traefik-auth"
- "traefik.http.middlewares.traefik-auth.basicauth.users=autonomic:$$apr1$$c2uyXKda$$aRey75.6YpkdA82yGf5VN1"
networks:
proxy:
external: true
volumes:
letsencrypt:
configs:
traefik-yml:
file: ./traefik-v1.yml