version: '3' services: rproxy: image: traefik:v2.9 container_name: traefik hostname: rproxy restart: unless-stopped security_opt: - no-new-privileges:true networks: - proxy ports: - 80:80 - 443:443 environment: - CF_API_EMAIL=$EMAIL - CF_API_KEY=$API_KEY volumes: - /etc/localtime:/etc/localtime:ro - /var/run/docker.sock:/var/run/docker.sock:ro - /root/traefik/data/traefik.yml:/traefik.yml:ro - /root/traefik/data/acme.json:/acme.json - /root/traefik/data/config.yml:/config.yml:ro - traefik-logs:/var/log/traefik labels: - "traefik.enable=true" - "traefik.http.routers.traefik.entrypoints=http" - "traefik.http.routers.traefik.rule=Host(`traefik.office.kh3group.com`)" - "traefik.http.middlewares.traefik-auth.basicauth.users=support:$$apr1$$/SnQnIjg$$kOB5lj/Au8brVdk.tsrFb/" - "traefik.http.middlewares.traefik-https-redirect.redirectscheme.scheme=https" - "traefik.http.middlewares.sslheader.headers.customrequestheaders.X-Forwarded-Proto=https" - "traefik.http.routers.traefik.middlewares=traefik-https-redirect" - "traefik.http.routers.traefik-secure.entrypoints=https" - "traefik.http.routers.traefik-secure.rule=Host(`traefik.office.kh3group.com`)||Host(`traefik.kh3group.com`)" - "traefik.http.routers.traefik-secure.middlewares=traefik-auth" - "traefik.http.routers.traefik-secure.tls=true" - "traefik.http.routers.traefik-secure.tls.certresolver=cloudflare" - "traefik.http.routers.traefik-secure.tls.domains[0].main=office.kh3group.com" - "traefik.http.routers.traefik-secure.tls.domains[0].sans=*.office.kh3group.com" - "traefik.http.routers.traefik-secure.service=api@internal" networks: proxy: external: true volumes: traefik-logs: