version: "3.9" services: portainer: image: portainer/portainer-ce:2.21.5 container_name: PortainerCE restart: unless-stopped volumes: - /mnt/user/appdata/portainer:/data - /var/run/docker.sock:/var/run/docker.sock:ro networks: - frontend_net labels: - "traefik.enable=true" - "traefik.docker.network=frontend_net" - "traefik.http.routers.portainer.rule=Host(`portainer.kaleschke.info`)" - "traefik.http.routers.portainer.entrypoints=websecure" - "traefik.http.routers.portainer.tls.certresolver=le" - "traefik.http.routers.portainer.middlewares=dashboard-auth@file,secure-headers@file" - "traefik.http.services.portainer.loadbalancer.server.port=9000" networks: frontend_net: external: true