services: portainer: container_name: portainer image: portainer/portainer-ce:latest restart: always volumes: - /var/run/docker.sock:/var/run/docker.sock - ./portainer_data:/data ports: - 9443:9443 # - 8000:8000 # Remove if you do not intend to use Edge Agents networks: - traefik-proxy labels: - "traefik.enable=true" - "traefik.docker.network=traefik-proxy" # Prod Router - "traefik.http.routers.portainer.rule=Host(`portainer.forust.xyz`)" - "traefik.http.routers.portainer.entrypoints=websecure" - "traefik.http.routers.portainer.middlewares=security-headers" - "traefik.http.routers.portainer.service=portainer" - "traefik.http.routers.portainer.tls=true" - "traefik.http.services.portainer.loadbalancer.server.port=9443" - "traefik.http.services.portainer.loadbalancer.server.scheme=https" - "traefik.http.services.portainer.loadbalancer.serverstransport=insecureTransport@file" # Local Router - "traefik.http.routers.portainer-local.rule=Host(`portainer.workstation.local`) || Host(`portainer.local`)" - "traefik.http.routers.portainer-local.entrypoints=websecure" - "traefik.http.routers.portainer-local.middlewares=security-headers" - "traefik.http.routers.portainer-local.service=portainer" - "traefik.http.routers.portainer-local.tls=true" # Dev Router - "traefik.http.routers.portainer-dev.rule=Host(`portainer.gigaforust.local`)" - "traefik.http.routers.portainer-dev.entrypoints=websecure" - "traefik.http.routers.portainer-dev.middlewares=security-headers" - "traefik.http.routers.portainer-dev.service=portainer" - "traefik.http.routers.portainer-dev.tls=true" - glance.name=Portainer - glance.url=https://portainer.forust.xyz/ - glance.description=Portainer is a lightweight management UI which allows you to easily manage your Docker environments. volumes: portainer_data: name: portainer_data networks: default: name: portainer_network traefik-proxy: external: true