-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
109 lines (92 loc) · 3.1 KB
/
Copy pathdocker-compose.yml
File metadata and controls
109 lines (92 loc) · 3.1 KB
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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
services:
traefik-idle:
image: traefik:v3.6
container_name: traefik-idle
restart: unless-stopped
command:
- --api.dashboard=true
- --api.insecure=true
- --entrypoints.web.address=:80
- --entrypoints.traefik.address=:8080
- --ping=true
- --providers.docker=true
- --providers.docker.endpoint=unix:///var/run/docker.sock
- --providers.docker.exposedbydefault=false
- --providers.docker.network=idle_proxy
# Required for Traefik v3 to track containers that are stopped
- --providers.docker.allowEmptyServices=true
# Sablier plugin
- --experimental.plugins.sablier.modulename=github.com/sablierapp/sablier-traefik-plugin
- --experimental.plugins.sablier.version=v1.1.0
# Secondary Front Proxy: Map a host port (e.g., 8080) to this Traefik
ports:
- "8080:80" # Main proxy traffic
# optional dashboard
# - "127.0.0.1:8090:8080"
volumes:
- /var/run/docker.sock:/var/run/docker.sock:ro
networks:
- idle_proxy
healthcheck:
test: [ "CMD", "traefik", "healthcheck", "--ping" ]
interval: 10s
timeout: 5s
retries: 3
deploy:
resources:
limits:
cpus: "0.25"
memory: 128M
reservations:
cpus: "0.10"
memory: 64M
sablier:
image: sablierapp/sablier:1.11.2
container_name: sablier
restart: unless-stopped
command:
- start
- --provider.name=docker
volumes:
- /var/run/docker.sock:/var/run/docker.sock
networks:
- idle_proxy
healthcheck:
test: [ "CMD", "sablier", "health", "--url", "http://localhost:10000/health" ]
interval: 10s
timeout: 5s
retries: 3
# whoami-sleep:
# image: traefik/whoami
# container_name: whoami-sleep
# restart: unless-stopped
# networks:
# - idle_proxy
# labels:
# - "traefik.enable=true"
# - "traefik.docker.network=idle_proxy"
# - "traefik.http.routers.whoami.rule=Host(`whoami.lab.local`)"
# - "traefik.http.routers.whoami.entrypoints=web"
# - "traefik.http.routers.whoami.service=whoami-svc"
# - "traefik.http.services.whoami-svc.loadbalancer.server.port=80"
# # Sablier configuration
# - "sablier.enable=true"
# - "sablier.group=whoami"
# # Middleware definition
# - "traefik.http.middlewares.whoami-sablier.plugin.sablier.group=whoami"
# - "traefik.http.middlewares.whoami-sablier.plugin.sablier.sablierUrl=http://sablier:10000"
# - "traefik.http.middlewares.whoami-sablier.plugin.sablier.sessionDuration=5m" # Stops after 5m idle
# - "traefik.http.middlewares.whoami-sablier.plugin.sablier.dynamic.displayName=Whoami Service"
# # Routing middleware to the router
# - "traefik.http.routers.whoami.middlewares=whoami-sablier"
# # CRITICAL: Tell Traefik to keep the service route even when it's closed
# - "traefik.docker.allownonrunning=true"
# deploy:
# resources:
# limits:
# cpus: "0.1"
# memory: 64M
networks:
idle_proxy:
name: idle_proxy
external: true