version: '3.3' volumes: portainer: networks: traefik_web: external: name: traefik_web services: portainer: image: portainer/portainer command: -H unix:///var/run/docker.sock restart: always networks: - traefik_web volumes: - /var/run/docker.sock:/var/run/docker.sock - portainer:/data command: -H unix:///var/run/docker.sock labels: - "traefik.enable=true" - "traefik.http.routers.portainer.rule=Host(`portainer.nickyeoman.com`)" - "traefik.http.routers.portainer.entrypoints=websecure" - "traefik.http.routers.portainer.tls=true" - "traefik.http.services.portainer.loadbalancer.server.port=9000"