-
Notifications
You must be signed in to change notification settings - Fork 2
/
docker-compose-loadtest.yml
234 lines (221 loc) · 6.78 KB
/
docker-compose-loadtest.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
224
225
226
227
228
229
230
231
232
233
234
version: '3.4'
# NOTE:
#
# we create a `localdev` network w/ a non-standard subnet mask to be able to use
# use docker from behdind a VPN, which is often necessary to auth w/ Signal.
# (see: https://github.com/docker/for-linux/issues/418#issuecomment-491323611)
#
# USAGE:
#
# for this to work you must first run the following (which is done automatically
# by `make _.setup`):
#
# ```bash
# docker network create localdev --subnet 10.0.1.0/24
# ```
networks:
default:
external:
name: localdev
volumes:
loadtest_postgres_data:
loadtest_receiver_signalc_gradle_cache:
loadtest_receiver_signalc_build_cache:
loadtest_receiver_sock:
loadtest_sender_sock:
loadtest_sender_signalc_gradle_cache:
loadtest_sender_signalc_build_cache:
loadtest_signald_data:
loadtest_grafana_data:
loadtest_prometheus_data:
services:
db:
image: postgres:12
container_name: loadtest_db
volumes:
- loadtest_postgres_data:/var/lib/postgresql/data
environment:
POSTGRES_HOST_AUTH_METHOD: trust
ports:
- 0.0.0.0:5432:5432
restart: unless-stopped
receiver_signalc:
image: registry.0xacab.org/team-friendo/signalboost/signalc:dev
container_name: loadtest_receiver_signalc
env_file: .env.dev
environment:
SIGNALC_ENV: ${SIGNALC_ENV:-load}
SIGNALC_DB_NAME: loadtest_receiver_signalc
GRADLE_USER_HOME: /home/gradle/.gradle
LOG_LEVEL: ${LOG_LEVEL:-debug}
DEBUG_MODE: ${DEBUG_MODE:-0}
DB_HOST: db
depends_on:
- db
ports:
- 0.0.0.0:5005:5005 # for remote debugger
volumes:
- ./signalc/src:/signalc/src
- ./signalc/build.gradle.kts:/signalc/build.gradle.kts
- ./signalc/gradle.properties:/signalc/gradle.properties
- ./signalc/settings.gradle.kts:/signalc/settings.gradle.kts
- ./signalc/migrations:/signalc/migrations
- ./bin:/signalc/bin
- loadtest_receiver_signalc_gradle_cache:/home/gradle/.gradle
- loadtest_receiver_signalc_build_cache:/signalc/build
- loadtest_receiver_sock:/signalc/sock
restart: unless-stopped
receiver_driver:
image: registry.0xacab.org/team-friendo/signalboost/signalboost
container_name: loadtest_receiver_driver
depends_on:
- db
- receiver_signalc
- prometheus
- grafana
entrypoint: "node /signalboost/simulator/receive.js"
env_file: .env.dev
environment:
DB_HOST: db
SOCKET_POOL_SIZE: 16
SIGNALBOOST_VERBOSE_LOG: ${SIGNALBOOST_VERBOSE_LOG:-1}
expose:
- 3001
networks:
- default
volumes:
- ./.sequelizerc:/signalboost/.sequelizerc
- ./app:/signalboost/app
- ./simulator:/signalboost/simulator
- ./bin:/signalboost/bin
- ./node_modules:/signalboost/node_modules
- ./package.json:/signalboost/package.json
- ./yarn.lock:/signalboost/yarn.lock
- loadtest_receiver_sock:/signalboost/sock/
restart: unless-stopped
seeder:
image: registry.0xacab.org/team-friendo/signalboost/signalboost
container_name: loadtest_simulator
depends_on:
- db
entrypoint: /signalboost/bin/entrypoint/simulator
env_file: .env.dev
environment:
DB_HOST: db
SOCKET_POOL_SIZE: 4
SIGNALBOOST_VERBOSE_LOG: ${SIGNALBOOST_VERBOSE_LOG:-1}
expose:
- 3001
networks:
- default
volumes:
- ./.sequelizerc:/signalboost/.sequelizerc
- ./app:/signalboost/app
- ./simulator:/signalboost/simulator
- ./bin:/signalboost/bin
- ./node_modules:/signalboost/node_modules
- ./package.json:/signalboost/package.json
- loadtest_signald_data:/var/lib/signald/data
- ./yarn.lock:/signalboost/yarn.lock
- ${SOCK_VOLUME:-loadtest_receiver_sock}:/signalboost/sock/
restart: unless-stopped
sender_driver:
image: registry.0xacab.org/team-friendo/signalboost/signalboost
container_name: loadtest_sender_driver
depends_on:
- db
env_file: .env.dev
environment:
DB_HOST: db
SOCKET_POOL_SIZE: 16
SIGNALBOOST_VERBOSE_LOG: ${SIGNALBOOST_VERBOSE_LOG:-1}
expose:
- 3001
networks:
- default
volumes:
- ./.sequelizerc:/signalboost/.sequelizerc
- ./app:/signalboost/app
- ./simulator:/signalboost/simulator
- ./bin:/signalboost/bin
- ./node_modules:/signalboost/node_modules
- ./package.json:/signalboost/package.json
- ./yarn.lock:/signalboost/yarn.lock
- loadtest_sender_sock:/signalboost/sock/
restart: unless-stopped
sender_signalc:
image: registry.0xacab.org/team-friendo/signalboost/signalc:dev
container_name: loadtest_sender_signalc
env_file: .env.dev
environment:
SIGNALC_ENV: ${SIGNALC_ENV:-load}
SIGNALC_DB_NAME: loadtest_sender_signalc
GRADLE_USER_HOME: /home/gradle/.gradle
LOG_LEVEL: ${LOG_LEVEL:-debug}
DEBUG_MODE: ${DEBUG_MODE:-0}
DB_HOST: db
depends_on:
- db
ports:
- 0.0.0.0:5006:5005 # for remote debugger
volumes:
- ./signalc/src:/signalc/src
- ./signalc/build.gradle.kts:/signalc/build.gradle.kts
- ./signalc/gradle.properties:/signalc/gradle.properties
- ./signalc/settings.gradle.kts:/signalc/settings.gradle.kts
- ./signalc/migrations:/signalc/migrations
- ~/.m2/:/root/.m2/
- ./bin:/signalc/bin
- loadtest_sender_signalc_gradle_cache:/home/gradle/.gradle
- loadtest_sender_signalc_build_cache:/signalc/build
- loadtest_sender_sock:/signalc/sock
restart: unless-stopped
sender_signald:
image: registry.0xacab.org/team-friendo/signalboost/signald-staging:latest
container_name: loadtest_sender_signald
env_file: .env.dev
environment:
SIGNALD_VERBOSE_LOG: ${SIGNALD_VERBOSE_LOG:-1}
networks:
- default
expose:
- 1312
ports:
- 0.0.0.0:9010:9010
- 0.0.0.0:8017:8016
volumes:
- ./bin:/signalboost/bin
- ./signald/jmx:/var/lib/jmx
- loadtest_signald_data:/var/lib/signald/data
- loadtest_sender_sock:/var/run/signald/
restart: unless-stopped
prometheus:
image: prom/prometheus:v2.18.1
ports:
- 9090:9090
user: root
networks:
- default
volumes:
- ./prometheus/prometheus_load.yml:/etc/prometheus/prometheus.yml
- loadtest_prometheus_data:/prometheus_data
command:
- '--config.file=/etc/prometheus/prometheus.yml'
- '--storage.tsdb.path=/prometheus_data'
- '--log.level=debug'
restart: always
grafana:
image: grafana/grafana:7.0.3
depends_on:
- prometheus
ports:
- 5000:5000
networks:
- default
volumes:
- loadtest_grafana_data:/var/lib/grafana
- ./grafana/provisioning/:/etc/grafana/provisioning/
- ./grafana/config/grafana.ini:/etc/grafana/grafana.ini
environment:
- GF_SERVER_HTTP_PORT=5000
restart: always