services: portainer: image: portainer/portainer-ce:latest container_name: portainer volumes: - portainer_data:/data - /var/run/docker.sock:/var/run/docker.sock ports: - 9443:9443 labels: - "traefik.enable=true" - "traefik.http.routers.portainer.rule=Host(`portainer.mat`)" - "traefik.http.routers.portainer.entrypoints=web" - "traefik.http.services.portainer.loadbalancer.server.port=9000" - "traefik.http.routers.portainer.service=portainer" - "traefik.docker.network=traefik" networks: - traefik restart: always volumes: portainer_data: networks: traefik: external: true