-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
187 lines (170 loc) · 3.59 KB
/
docker-compose.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
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
version: "2"
services:
docs:
build: ./docs
image: registry.gitlab.com/thanhson1085/koor:docs
restart: "on-failure:3"
networks:
- front-net
users:
build: ./users
image: registry.gitlab.com/thanhson1085/koor:users
restart: "on-failure:3"
environment:
GITHUB_CLIENT_SECRET: ${GITHUB_CLIENT_SECRET}
MAILER_AUTH_PASS: ${MAILER_AUTH_PASS}
MAILER_AUTH_USER: ${MAILER_AUTH_USER}
depends_on:
- db
- redis
- elasticsearch
- neo4j
networks:
- front-net
- back-net
apps:
build: ./apps
image: registry.gitlab.com/thanhson1085/koor:apps
restart: "on-failure:3"
depends_on:
- db
- redis
- elasticsearch
- neo4j
environment:
MAILER_AUTH_PASS: ${MAILER_AUTH_PASS}
MAILER_AUTH_USER: ${MAILER_AUTH_USER}
CLOUDFLARE_API_KEY: ${CLOUDFLARE_API_KEY}
networks:
- front-net
- back-net
socials:
build: ./socials
image: registry.gitlab.com/thanhson1085/koor:socials
restart: "on-failure:3"
environment:
MAILER_AUTH_PASS: ${MAILER_AUTH_PASS}
MAILER_AUTH_USER: ${MAILER_AUTH_USER}
depends_on:
- db
- redis
- elasticsearch
- neo4j
networks:
- front-net
- back-net
socket:
build: ./websocket
image: registry.gitlab.com/thanhson1085/koor:socket
restart: "on-failure:3"
depends_on:
- redis
networks:
- front-net
- back-net
iot:
build: ./iot
image: registry.gitlab.com/thanhson1085/koor:iot
restart: "on-failure:3"
depends_on:
- db
- redis
networks:
- front-net
- back-net
site:
build: ./site
image: registry.gitlab.com/thanhson1085/koor:site
networks:
- front-net
land:
build: ./land
image: registry.gitlab.com/thanhson1085/koor:land
networks:
- front-net
cms:
build: ./cms
image: registry.gitlab.com/thanhson1085/koor:cms
depends_on:
- db
environment:
SECRET_KEY_BASE: ${SECRET_KEY_BASE}
RAILS_SERVE_STATIC_FILES: "yes"
RAILS_LOG_TO_STDOUT: "yes"
networks:
- back-net
- front-net
redis:
image: redis:alpine
networks:
- back-net
db:
image: mongo:3.2
volumes:
- "mongodb:/data/db"
networks:
- back-net
nginx:
image: nginx
volumes:
- ./nginx/app.template:/etc/nginx/conf.d/default.conf
- ./nginx/nginx.template:/etc/nginx/nginx.conf
- ./nginx/.htpasswd:/etc/nginx/.htpasswd
- ./nginx/certs:/etc/certs
depends_on:
- apps
- users
- broker
- socket
networks:
- front-net
- proxy-net
broker:
build: ./broker
image: registry.gitlab.com/thanhson1085/koor:broker
depends_on:
- iot
networks:
- front-net
- proxy-net
- back-net
haproxy:
image: haproxy:alpine
volumes:
- ./haproxy/haproxy.cfg:/usr/local/etc/haproxy/haproxy.cfg
- ./haproxy/errors/:/usr/local/etc/haproxy/errors/
ports:
- "80:80"
- "443:443"
- "1883:1883"
- "8883:8883"
- "1936:1936"
depends_on:
- nginx
- broker
networks:
- proxy-net
neo4j:
image: neo4j
environment:
- NEO4J_AUTH=neo4j/koor.10
volumes:
- "neo4j:/data"
networks:
- back-net
elasticsearch:
image: elasticsearch
volumes:
- "elasticsearch:/usr/share/elasticsearch/data"
networks:
- monitor-net
- back-net
volumes:
mongodb:
elasticsearch:
neo4j:
networks:
front-net:
back-net:
monitor-net:
proxy-net: