-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-stack.yml
93 lines (91 loc) · 2.52 KB
/
docker-stack.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
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
# yaml-language-server: $schema=https://raw.githubusercontent.com/swarmlibs/dockerstack-schema/main/schema/dockerstack-spec.json
x-default-logging: &x-default-logging
options:
max-size: "12m"
max-file: "5"
driver: json-file
services:
# ====================================================
# crazy-max/swarm-cronjob
# https://github.com/crazy-max/swarm-cronjob
# ====================================================
cronjob:
image: crazymax/swarm-cronjob
environment:
TZ: "${TZ:-UTC}"
LOG_LEVEL: "info"
LOG_JSON: "false"
volumes:
- type: bind
target: /var/run/docker.sock
source: /var/run/docker.sock
deploy:
mode: replicated
replicas: 1
restart_policy:
condition: any
delay: 5s
update_config:
parallelism: 1
delay: 10s
rollback_config:
parallelism: 1
delay: 10s
resources:
limits:
memory: 32M
reservations:
memory: 16M
placement:
constraints:
- node.role == manager
logging: *x-default-logging
# ====================================================
# containrrr/shepherd
# https://github.com/containrrr/shepherd
# ====================================================
shepherd:
image: containrrr/shepherd
environment:
# Beware YAML gotchas regarding quoting:
# With KEY: 'VALUE', quotes are part of yaml syntax and thus get stripped
# but with KEY='VALUE', they are part of the value and stay there,
# causing problems!
VERBOSE: "true"
TZ: "${TZ:-UTC}"
REGISTRY_HOST:
REGISTRY_USER:
REGISTRY_PASSWORD:
FILTER_SERVICES: "label=shepherd.enable=true"
SLEEP_TIME: "${SLEEP_TIME:-5m}"
WITH_REGISTRY_AUTH:
WITH_INSECURE_REGISTRY:
UPDATE_OPTIONS: "${UPDATE_OPTIONS:---update-delay=30s}"
ROLLBACK_OPTIONS: "${ROLLBACK_OPTIONS:---rollback-delay=0s}"
volumes:
- type: bind
source: /var/run/docker.sock
target: /var/run/docker.sock
deploy:
mode: replicated
replicas: 1
restart_policy:
condition: any
delay: 5s
update_config:
parallelism: 1
delay: 10s
rollback_config:
parallelism: 1
delay: 10s
resources:
limits:
memory: 32M
reservations:
memory: 16M
placement:
constraints:
- node.role == manager
labels:
- "shepherd.enable=false"
logging: *x-default-logging