# Managed by Ansible — do not edit manually services: traefik: image: traefik:{{ traefik_version }} container_name: traefik restart: unless-stopped ports: - "80:80" - "443:443" volumes: - /var/run/docker.sock:/var/run/docker.sock:ro - {{ traefik_data_dir }}/traefik.yml:/traefik.yml:ro - {{ traefik_data_dir }}/acme.json:/acme.json networks: - traefik_public labels: - "traefik.enable=true" # Dashboard — accessible at cloud.ladkau.de/dashboard/ protected by basic auth - "traefik.http.routers.dashboard.rule=Host(`{{ domain_cloud }}`) && (PathPrefix(`/api`) || PathPrefix(`/dashboard`))" - "traefik.http.routers.dashboard.entrypoints=websecure" - "traefik.http.routers.dashboard.tls.certresolver=letsencrypt" - "traefik.http.routers.dashboard.service=api@internal" - "traefik.http.routers.dashboard.middlewares=dashboard-auth" - "traefik.http.middlewares.dashboard-auth.basicauth.users={{ traefik_dashboard_users }}" networks: traefik_public: external: true