docker-deploy/portainer/docker-compose.yml

30 lines
1.0 KiB
YAML
Raw Normal View History

2021-12-02 23:23:17 +08:00
version: "3.9"
services:
portainer:
image: portainer/portainer-ce
2021-12-02 23:32:58 +08:00
container_name: "portainer.esin.io"
2021-12-02 23:23:17 +08:00
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"
2021-12-02 23:43:36 +08:00
- "traefik.http.routers.portainer.tls.certresolver=letsencrypt"
2021-12-03 04:20:08 +08:00
- "traefik.http.routers.portainer.tls.domains[0].main=esin.io"
- "traefik.http.routers.portainer.tls.domains[0].sans=*.esin.io"
2021-12-02 23:23:17 +08:00
- "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
2021-12-02 23:32:58 +08:00
- /var/run/docker.sock:/var/run/docker.sock
2021-12-02 23:23:17 +08:00
networks:
- traefik
2021-12-02 23:32:58 +08:00
2021-12-02 23:23:17 +08:00
networks:
traefik:
external: true