-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathswarmview-compose.yaml
72 lines (68 loc) · 2.03 KB
/
swarmview-compose.yaml
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
version: '3.8'
networks:
internal:
driver: overlay
driver_opts:
encrypted: 'true'
monitoring-ingress:
name: monitoring-ingress
external: true
services:
dockerproxy:
image: wollomatic/socket-proxy:1.3.1 # see https://github.com/wollomatic/socket-proxy for reference
deploy:
mode:
global
resources:
limits:
cpus: '1'
memory: 64M
healthcheck:
test: [ 'CMD', '/healthcheck' ]
interval: 10s
timeout: 10s
retries: 3
start_period: 20s
networks:
- internal
command:
# with this configuration socket-proxy acts similar to the tecnativa proxy. For additional hardening
# please refer to the documentation of the wollomatic/socket-proxy image
- '-loglevel=debug' # set to debug for far more logging
- '-allowfrom=10.0.0.0/16'
- '-listenip=0.0.0.0'
- '-allowGET=/v1\.45/(.+)' # this regexp allows readonly access to anything
- '-shutdowngracetime=5'
- '-watchdoginterval=600'
- '-stoponwatchdog'
- '-allowhealthcheck'
user: 65534:1001 # replace <<docker-gid>> with the docker gid on your host system
read_only: true
volumes:
- /var/run/docker.sock:/var/run/docker.sock:ro
swarmview:
image: ghcr.io/yaytay/swarmview:0.0.26
deploy:
replicas: 2
resources:
limits:
cpus: '1'
memory: 64M
labels:
- traefik.http.routers.swarmview.entrypoints=internal
- traefik.http.routers.swarmview.rule=Host(`swarmview`)
- traefik.http.services.swarmview.loadbalancer.server.port=5173
- traefik.docker.network=monitoring-ingress
- traefik.enable=true
healthcheck:
test: [ 'CMD', '/health' ]
interval: 10s
timeout: 10s
retries: 3
start_period: 20s
environment:
- DOCKER_PROXY_ENDPOINT=dockerproxy:2375
networks:
- internal
- monitoring-ingress
read_only: true