-
Notifications
You must be signed in to change notification settings - Fork 10
/
docker-compose.test.yml
223 lines (219 loc) · 6.41 KB
/
docker-compose.test.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
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
version: '2.2'
networks:
nat:
external: true
internal:
external: false
services:
mosquitto:
env_file: .env
build: ./services/broker
ports:
- '1883:1883' # mqtt
- '1884:1883' # mqtts
- '8883:8883' # websocket
restart: unless-stopped
networks:
- nat
- internal
labels:
- traefik.backend.mosquitto.noexpose
couchdb:
env_file: .env
image: 'couchdb:3.1.0'
restart: unless-stopped
environment:
- 'NODENAME=${NODENAME}'
- 'COUCHDB_USER=${COUCHDB_USER}'
- 'COUCHDB_PASSWORD=${COUCHDB_PASS}'
- 'COUCHDB_ADMIN=${COUCHDB_USER}'
- 'COUCHDB_PASS=${COUCHDB_PASS}'
- 'COUCHDB_COOKIE=${COUCHDB_COOKIE}'
- 'COUCHDB_SECRET=${COUCHDB_SECRET}'
ports:
- 5984:5984
networks:
- nat
- internal
thinx-redis:
env_file: .env
networks:
- internal
image: thinxcloud/redis
command:
- redis-server
- '--requirepass'
- '${REDIS_PASSWORD}'
- '--port'
- '6379'
environment:
- 'ALLOW_EMPTY_PASSWORD=no'
- 'REDIS_PASSWORD=${REDIS_PASSWORD}'
- 'REDIS_DISABLE_COMMANDS=FLUSHDB,FLUSHALL'
restart: unless-stopped
ports:
- 6379
labels:
- traefik.backend.thinx-redis
transformer:
env_file: .env
user: transformer
image: thinxcloud/transformer
restart: unless-stopped
environment:
- 'ROLLBAR_ACCESS_TOKEN=${ROLLBAR_ACCESS_TOKEN}'
- 'ROLLBAR_ENVIRONMENT=${ROLLBAR_ENVIRONMENT}'
- 'REVISION=1'
networks:
- internal
ports:
- 7474
labels:
- traefik.backend.transformer.noexpose
worker:
env_file: .env
image: thinxcloud/worker:latest
# build: ./services/worker
restart: unless-stopped
environment:
- "ROLLBAR_ACCESS_TOKEN=${ROLLBAR_ACCESS_TOKEN}"
- "ROLLBAR_ENVIRONMENT=${ROLLBAR_ENVIRONMENT}"
- "THINX_SERVER=${THINX_SERVER}"
- "WORKER_SECRET=${WORKER_SECRET}"
networks:
- internal
labels:
- traefik.backend.worker.noexpose
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- /var/lib/docker
- /cache
api:
privileged: true
shm_size: 2048M
restart: "no"
depends_on:
- transformer
- thinx-redis
- mosquitto
networks:
- nat
- internal
env_file: .env
build:
context: .
dockerfile: ./Dockerfile
args:
- 'AQUA_SEC_TOKEN=${AQUA_SEC_TOKEN}'
- 'COUCHDB_PASS=${COUCHDB_PASS}'
- 'COUCHDB_USER=${COUCHDB_USER}'
- 'ENVIRONMENT=${ENVIRONMENT}'
- 'ENTERPRISE=${ENTERPRISE}'
- 'REDIS_PASSWORD=${REDIS_PASSWORD}'
- 'REVISION=${REVISION}'
- 'ROLLBAR_ACCESS_TOKEN=${ROLLBAR_ACCESS_TOKEN}'
- 'ROLLBAR_ENVIRONMENT=${ROLLBAR_ENVIRONMENT}'
- 'THINX_HOSTNAME=${THINX_HOSTNAME}'
- 'THINX_OWNER_EMAIL=${THINX_OWNER_EMAIL}'
- 'WORKER_SECRET=${WORKER_SECRET}'
- 'MAILGUN_API_KEY=${MAILGUN_API_KEY}'
environment:
- 'AQUA_SEC_TOKEN=${AQUA_SEC_TOKEN}'
- 'COUCHDB_PASS=${COUCHDB_PASS}'
- 'COUCHDB_USER=${COUCHDB_USER}'
- 'ENVIRONMENT=${ENVIRONMENT}'
- 'ENTERPRISE=${ENTERPRISE}'
- 'GITHUB_CLIENT_ID=${GITHUB_CLIENT_ID}'
- 'GITHUB_CLIENT_SECRET=${GITHUB_CLIENT_SECRET}'
- 'GITHUB_SECRET=${GITHUB_SECRET}'
- 'GOOGLE_OAUTH_ID=${GOOGLE_OAUTH_ID}'
- 'GOOGLE_OAUTH_SECRET=${GOOGLE_OAUTH_SECRET}'
- 'REDIS_PASSWORD=${REDIS_PASSWORD}'
- 'REVISION=${REVISION}'
- 'ROLLBAR_ACCESS_TOKEN=${ROLLBAR_ACCESS_TOKEN}'
- 'ROLLBAR_ENVIRONMENT=${ROLLBAR_ENVIRONMENT}'
- 'SLACK_BOT_TOKEN=${SLACK_BOT_TOKEN}'
- 'SLACK_CLIENT_ID=${SLACK_CLIENT_ID}'
- 'SLACK_CLIENT_SECRET=${SLACK_CLIENT_SECRET}'
- 'SLACK_WEBHOOK=${SLACK_WEBHOOK}'
- 'THINX_HOSTNAME=${THINX_HOSTNAME}'
- 'THINX_OWNER_EMAIL=${THINX_OWNER_EMAIL}'
- 'WORKER_SECRET=${WORKER_SECRET}'
- 'GITHUB_ACCESS_TOKEN=${GITHUB_ACCESS_TOKEN}'
- 'MAILGUN_API_KEY=${MAILGUN_API_KEY}'
ports:
- '7442:7442'
- '7443:7443'
- '3000' # worker socket
volumes:
- '/var/run/docker.sock:/var/run/docker.sock'
- '/var/lib/docker'
- '/cache'
- '/mnt/data/statistics:/mnt/data/statistics'
- '/mnt/data/repos:/mnt/data/repos'
labels:
- traefik.docker.network=nat
- traefik.enable=true
- traefik.port=7442
- traefik.backend=thinx-api
- 'traefik.frontend.rule=Host:${THINX_HOSTNAME}'
console:
depends_on:
- api
env_file:
- .env
build:
context: ./services/console/src
args:
- 'LANDING_HOSTNAME=${LANDING_HOSTNAME}'
- 'WEB_HOSTNAME=${WEB_HOSTNAME}'
- 'API_HOSTNAME=${API_HOSTNAME}'
- 'API_BASEURL=${API_BASEURL}'
- 'ENTERPRISE=${ENTERPRISE}'
- 'ENVIRONMENT=${ENVIRONMENT}'
- 'GOOGLE_ANALYTICS_ID=${GOOGLE_ANALYTICS_ID}'
- 'ROLLBAR_ACCESS_TOKEN=${ROLLBAR_ACCESS_TOKEN}'
- 'CRISP_WEBSITE_ID=${CRISP_WEBSITE_ID}'
networks:
- nat
- internal
# logging:
# driver: none
ports:
- '8000:80'
restart: unless-stopped # may be required for updating SSL certs
environment:
- 'LANDING_HOSTNAME=${LANDING_HOSTNAME}'
- 'WEB_HOSTNAME=${WEB_HOSTNAME}'
- 'API_HOSTNAME=${API_HOSTNAME}'
- 'API_BASEURL=${API_BASEURL}'
- 'ENTERPRISE=${ENTERPRISE}'
- 'ENVIRONMENT=${ENVIRONMENT}'
- 'GOOGLE_ANALYTICS_ID=${GOOGLE_ANALYTICS_ID}'
- 'ROLLBAR_ACCESS_TOKEN=${ROLLBAR_ACCESS_TOKEN}'
- 'CRISP_WEBSITE_ID=${CRISP_WEBSITE_ID}'
labels:
- traefik.enable=true
- traefik.port=80
- traefik.backend=console
- 'traefik.frontend.rule=Host:${WEB_HOSTNAME}'
- 'traefik.frontend.entryPoints=http,https'
- traefik.frontend.headers.SSLRedirect=false
- traefik.frontend.headers.SSLForceHost=true
- 'traefik.frontend.headers.SSLHost=${WEB_HOSTNAME}'
# - traefik.frontend.headers.forceSTSHeader=true
# - traefik.frontend.headers.STSSeconds=315360000
# - traefik.frontend.headers.STSIncludeSubdomains=true
# - traefik.frontend.headers.STSPreload=true
influxdb:
image: influxdb:1.8
ports:
- '8086:8086'
networks:
- internal
volumes:
- '/mnt/gluster/thinx/influx:/var/lib/influxdb'
environment:
- INFLUXDB_DB=db0
- INFLUXDB_ADMIN_USER=${INFLUXDB_USERNAME}
- INFLUXDB_ADMIN_PASSWORD=${INFLUXDB_PASSWORD}