version: "3.9" services: portainer: image: portainer/portainer-ce container_name: "portainer.esin.io" environment: - "TZ=Asia/Shanghai" labels: - "traefik.enable=true" - "traefik.http.routers.portainer.rule=Host(`portainer.esin.io`)" - "traefik.http.routers.portainer.entrypoints=websecure" - "traefik.http.routers.portainer.tls=true" - "traefik.http.routers.portainer.tls.certresolver=letsencrypt" - "traefik.http.routers.portainer.tls.domains[0].main=esin.io" - "traefik.http.routers.portainer.tls.domains[0].sans=*.esin.io" - "traefik.http.routers.portainer.middlewares=portainer-mw" - "traefik.http.middlewares.portainer-mw.compress=true" - "traefik.http.middlewares.portainer-mw.compress.excludedcontenttypes=text/event-stream" - "traefik.http.services.portainer.loadbalancer.server.port=9000" volumes: - ./data:/data - /var/run/docker.sock:/var/run/docker.sock networks: - traefik networks: traefik: external: true