-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose-portainer.yml
29 lines (26 loc) · 1.13 KB
/
docker-compose-portainer.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
name: "portainer"
services:
portainer:
image: portainer/portainer-ce:latest
container_name: portainer
command: -H unix:///var/run/docker.sock
ports:
- "9000:9000"
networks:
- traefik
volumes:
- "portainer_data:/data" # Монтируем том для хранения данных Portainer
- "/var/run/docker.sock:/var/run/docker.sock" # Доступ к Docker демону
labels:
- "traefik.enable=true" # Включаем Traefik для Portainer
- "traefik.http.routers.portainer.rule=Host(`portainer.kowlad.ru`)" # Домен для доступа к Portainer
- "traefik.http.services.portainer.loadbalancer.server.port=9000" # Порт Portainer внутри контейнера
- "traefik.http.routers.portainer.entrypoints=websecure"
- "traefik.http.routers.portainer.tls=true"
- "traefik.http.routers.portainer.tls.certresolver=leresolver"
restart: unless-stopped
networks:
traefik:
external: true
volumes:
portainer_data: # Здесь хранится вся информация о Portainer