-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathstack.yml
151 lines (148 loc) · 3.17 KB
/
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
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
version: "3.6"
services:
consulserver:
image: consul:${CONSUL_TAG:-latest}
restart: unless-stopped
volumes:
- ${PWD}/consul/server:/consul/config
- consul_files:/consul/data
ports:
- target: 8300
published: 8300
mode: host
- target: 8301
published: 8301
mode: host
- target: 8302
published: 8302
mode: host
- target: 8400
published: 8400
mode: host
- target: 8500
published: 8500
mode: host
- target: 8600
published: 8600
mode: host
command:
- agent
- -server
- -config-file=/consul/config/config.json
- -ui
networks:
- devops
deploy:
resources:
reservations:
cpus: '.25'
memory: 256M
restart_policy:
condition: on-failure
delay: 5s
max_attempts: 3
window: 120s
update_config:
order: stop-first
consulagent:
image: consul:${CONSUL_TAG:-latest}
restart: unless-stopped
volumes:
- ${PWD}/consul/agent:/consul/config
- consul_agent_files:/consul/data
command:
- agent
- -config-file=/consul/config/config.json
networks:
- devops
deploy:
resources:
reservations:
cpus: '.25'
memory: 256M
restart_policy:
condition: on-failure
delay: 5s
max_attempts: 3
window: 120s
update_config:
order: stop-first
vault:
image: vault:${VAULT_TAG:-latest}
restart: unless-stopped
environment:
VAULT_ADDR: http://127.0.0.1:8200
VAULT_LOCAL_CONFIG: >-
{
"ui": true,
"backend": {
"consul": {
"address" : "http://consulserver:8500",
"path" : "vault/"
}
},
"default_lease_ttl": "168h",
"max_lease_ttl": "720h",
"plugin_directory" : "/vault/plugins",
"listener": {
"tcp": {
"address": "0.0.0.0:8200",
"tls_disable": true
}
},
"disable_mlock": true
}
command:
- server
networks:
- devops
volumes:
- vault_logs:/vault/logs
- ${PWD}/vault/plugins:/vault/plugins
ports:
- target: 8200
published: 8200
mode: host
deploy:
resources:
reservations:
cpus: '.25'
memory: 256M
restart_policy:
condition: on-failure
delay: 5s
max_attempts: 3
window: 120s
update_config:
order: stop-first
mongo:
image: mongo:3
volumes:
- mongo_data:/data/db
ulimits:
nproc: 65535
networks:
- devops
ports:
- target: 27017
published: 27017
mode: host
deploy:
# resources:
# reservations:
# cpus: '.25'
# memory: 256M
restart_policy:
condition: on-failure
delay: 5s
max_attempts: 3
window: 120s
update_config:
order: stop-first
volumes:
consul_files:
consul_agent_files:
vault_logs:
mongo_data:
networks:
devops: