-
Notifications
You must be signed in to change notification settings - Fork 2
/
docker-compose.yml
66 lines (61 loc) · 1.36 KB
/
docker-compose.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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
version: '3.2'
services:
agent:
image: portainer/agent:2.15.1
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- /var/lib/docker/volumes:/var/lib/docker/volumes
networks:
- agent_network
deploy:
mode: global
placement:
constraints: [node.platform.os == linux]
portainer:
image: portainer/portainer-ce:2.15.1
command: -H tcp://tasks.agent:9001 --tlsskipverify
volumes:
- portainer_data:/data
networks:
- agent_network
- caddy_public
deploy:
mode: replicated
replicas: 1
placement:
constraints: [node.role == manager]
caddy:
image: caddy:2-alpine
restart: unless-stopped
environment:
SERVER_NAME: ${SERVER_NAME:-localhost}
networks:
- caddy_public
volumes:
- ./caddy/Caddyfile:/etc/caddy/Caddyfile
- caddy_data:/data
- caddy_config:/config
ports:
# HTTP
- target: 80
published: ${HTTP_PORT:-80}
protocol: tcp
# HTTPS
- target: 443
published: ${HTTPS_PORT:-443}
protocol: tcp
# HTTP/3
- target: 443
published: ${HTTP3_PORT:-443}
protocol: udp
networks:
agent_network:
driver: overlay
attachable: true
caddy_public:
driver: overlay
attachable: true
volumes:
portainer_data:
caddy_data:
caddy_config: