-
Notifications
You must be signed in to change notification settings - Fork 1
/
docker-stack.yml
166 lines (158 loc) · 3.43 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
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
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
version: "3.3"
services:
waf:
image: amioranza/naxsi
hostname: naxsi
restart: always
depends_on:
- elasticsearch
networks:
- waf-frontend
- waf-backend
ports:
- "80:80"
- "443:443"
configs:
- source: nginx-conf
target: /etc/nginx/nginx.conf
mode: 0440
uid: '100'
gid: '101'
- source: ghost-conf-v2
target: /etc/nginx/sites-enabled/ghost.conf
mode: 0440
uid: '100'
gid: '101'
- source: plan-hom-conf-v3
target: /etc/nginx/sites-enabled/plan-hom.conf
mode: 0440
uid: '100'
gid: '101'
deploy:
placement:
constraints: [node.role == worker]
replicas: 1
update_config:
parallelism: 1
delay: 10s
restart_policy:
condition: on-failure
app-01:
image: ghost:alpine
hostname: ghost
restart: always
networks:
- waf-backend
volumes:
- ghost_data:/var/lib/ghost/content
deploy:
placement:
constraints: [node.role == worker]
replicas: 1
restart_policy:
condition: on-failure
app-02:
image: jenkins:alpine
hostname: jenkins
restart: always
networks:
- waf-backend
volumes:
- jenkins_data:/var/jenkins_home/
deploy:
placement:
constraints: [node.role == worker]
replicas: 1
restart_policy:
condition: on-failure
elasticsearch:
image: elasticsearch
hostname: elasticsearch
restart: always
environment:
ES_JAVA_OPTS: "-Xms2g -Xmx2g"
volumes:
- elasticsearch_data:/usr/share/elasticsearch/data
networks:
- waf-backend
ports:
- "9200:9200"
deploy:
placement:
constraints: [node.role == worker]
replicas: 1
update_config:
parallelism: 1
delay: 10s
restart_policy:
condition: on-failure
kibana:
image: kibana
hostname: kibana
restart: always
volumes:
- kibana_data:/usr/share/kibana/data
networks:
- waf-backend
ports:
- "8008:5601"
deploy:
placement:
constraints: [node.role == worker]
replicas: 1
restart_policy:
condition: on-failure
logstash:
image: amioranza/logstash
hostname: logstash
restart: always
volumes:
- logstash_data:/usr/share/logstash/data
networks:
- waf-backend
ports:
- "514:5140/tcp"
- "514:5140/udp"
deploy:
placement:
constraints: [node.role == worker]
replicas: 1
restart_policy:
condition: on-failure
volumes:
elasticsearch_data:
driver: nfs
driver_opts:
share: swarm-node01:/data/docker/volumes/elasticsearch_data
kibana_data:
driver: nfs
driver_opts:
share: swarm-node01:/data/docker/volumes/kibana_data
logstash_data:
driver: nfs
driver_opts:
share: swarm-node01:/data/docker/volumes/logstash_data
ghost_data:
driver: nfs
driver_opts:
share: swarm-node01:/data/docker/volumes/ghost_data
jenkins_data:
driver: nfs
driver_opts:
share: swarm-node01:/data/docker/volumes/jenkins_data
networks:
waf-frontend:
ipam:
config:
- subnet: 10.157.157.0/24
waf-backend:
ipam:
config:
- subnet: 10.158.158.0/24
configs:
nginx-conf:
external: true
ghost-conf-v2:
external: true
plan-hom-conf-v3:
external: true