ProxmoxDeploy/resources/lxc/100/data/config/traefikv2/docker-compose.yml

40 lines
1.2 KiB
YAML

version: "3"
services:
app:
image: traefik:v2.9
env_file: /var/data/config/traefikv2/traefik.env
restart: always
ports:
- "80:80" # http
- "443:443" # https
volumes:
- /var/run/docker.sock:/var/run/docker.sock:ro
- /var/data/config/traefikv2/dyn:/dyn
- /var/data/config/traefikv2/traefik.toml:/etc/traefik/traefik.toml
- /var/data/traefik/traefik.log:/traefik.log
- /var/data/traefik/access.log:/access.log
- /var/data/traefik/acme.json:/acme.json
labels:
- "traefik.enable=true"
- "traefik.http.routers.api.rule=Host(`traefik.xyz.abc`)"
- "traefik.http.routers.api.entrypoints=https"
- "traefik.http.routers.api.service=api@internal"
- "traefik.http.services.dummy.loadbalancer.server.port=9999"
- "traefik.http.routers.api.tls=true"
- "traefik.http.routers.api.tls.domains[0].main=xyz.abc"
- "traefik.http.routers.api.tls.domains[0].sans=*.xyz.abc"
- "traefik.http.routers.api.tls.certresolver=cloudflare"
networks:
- traefik_public
logging:
driver: "json-file"
options:
max-size: "2m"
max-file: "2"
networks:
traefik_public:
external: true