-
Notifications
You must be signed in to change notification settings - Fork 2
/
docker-compose.yml
170 lines (156 loc) · 4.54 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
version: '3.4'
x-signald-base: &signald-base
image: registry.0xacab.org/team-friendo/signalboost/signald
environment:
SIGNALBOOST_HOST_IP: ${SIGNALBOOST_HOST_IP}
SIGNALD_VERBOSE_LOG: ${SIGNALD_VERBOSE_LOG:-0}
networks:
- default
restart: always
volumes:
postgres_data:
signal_data:
signald_sock_0:
signald_sock_1:
signald_sock_2:
signald_sock_3:
signald_sock_4:
signald_sock_5:
services:
db:
image: postgres:12
container_name: signalboost_db
volumes:
- postgres_data:/var/lib/postgresql/data
- ./bin/db/:/bin/db/
environment:
POSTGRES_HOST_AUTH_METHOD: trust
restart: always
app:
image: registry.0xacab.org/team-friendo/signalboost/signalboost:latest
container_name: signalboost_app
depends_on:
- db
- signald_0
- signald_1
- signald_2
- signald_3
- signald_4
- signald_5
entrypoint: /signalboost/bin/entrypoint/app
environment:
DEFAULT_LANGUAGE: ${DEFAULT_LANGUAGE:-EN}
DB_HOST: db
NODE_ENV: ${NODE_ENV:-development}
PROJECT_ROOT: ${PWD}
SHARD_COUNT: 6
SHOULD_RUN_KEYSTORE_DELETION: 1
SHOULD_RUN_HEALTHCHECKS: 1
SIGNAL_CLIENT: SIGNALD
SIGNALBOOST_VERBOSE_LOG: ${SIGNALBOOST_VERBOSE_LOG:-0}
SOCKET_POOL_SIZE: 1
REREGISTER_ON_STARTUP: ${REREGISTER_ON_STARTUP:-0}
expose:
- 3000
networks:
- default
volumes:
- ./.sequelizerc:/signalboost/.sequelizerc
- ./app:/signalboost/app
- ./bin:/signalboost/bin
- ./node_modules:/signalboost/node_modules
- ./package.json:/signalboost/package.json
- ./yarn.lock:/signalboost/yarn.lock
- /var/run/docker.sock:/var/run/docker.sock
- signal_data:/var/lib/signald/data
- signald_sock_0:/signalboost/sockets/0
- signald_sock_1:/signalboost/sockets/1
- signald_sock_2:/signalboost/sockets/2
- signald_sock_3:/signalboost/sockets/3
- signald_sock_4:/signalboost/sockets/4
- signald_sock_5:/signalboost/sockets/5
restart: always
signald_0:
<<: *signald-base
container_name: signalboost_signald_0
environment:
METRICS_PORT: 5000
expose:
- 5000
volumes:
- signald_sock_0:/var/run/signald/
# NOTE: we would like to DRY this up by extracting the below 4 volumes to &signald-base,
# but can't b/c yml doesn't support list merging and leveraging docker-compose's ability
# to merge lists between base and override files seems indirect and confusing (and unDRY)
# when we would have to place socket file overrides that are the same in dev and prod
# in the respective override files for dev and prod.for context see:
# https://stackoverflow.com/questions/61178058/docker-compose-merge-arrays-for-yaml-aliases-and-anchors
- signal_data:/var/lib/signald/data
- ./bin:/signalboost/bin
- ./signald/jmx:/var/lib/jmx
- ./backups:/backups
signald_1:
<<: *signald-base
container_name: signalboost_signald_1
environment:
METRICS_PORT: 5001
expose:
- 5001
volumes:
- signald_sock_1:/var/run/signald/
- signal_data:/var/lib/signald/data
- ./bin:/signalboost/bin
- ./signald/jmx:/var/lib/jmx
- ./backups:/backups
signald_2:
<<: *signald-base
container_name: signalboost_signald_2
environment:
METRICS_PORT: 5002
expose:
- 5002
volumes:
- signald_sock_2:/var/run/signald/
- signal_data:/var/lib/signald/data
- ./bin:/signalboost/bin
- ./signald/jmx:/var/lib/jmx
- ./backups:/backups
signald_3:
<<: *signald-base
container_name: signalboost_signald_3
environment:
METRICS_PORT: 5003
expose:
- 5003
volumes:
- signald_sock_3:/var/run/signald/
- signal_data:/var/lib/signald/data
- ./bin:/signalboost/bin
- ./signald/jmx:/var/lib/jmx
- ./backups:/backups
signald_4:
<<: *signald-base
container_name: signalboost_signald_4
environment:
METRICS_PORT: 5004
expose:
- 5004
volumes:
- signald_sock_4:/var/run/signald/
- signal_data:/var/lib/signald/data
- ./bin:/signalboost/bin
- ./signald/jmx:/var/lib/jmx
- ./backups:/backups
signald_5:
<<: *signald-base
container_name: signalboost_signald_5
environment:
METRICS_PORT: 5005
expose:
- 5005
volumes:
- signald_sock_5:/var/run/signald/
- signal_data:/var/lib/signald/data
- ./bin:/signalboost/bin
- ./signald/jmx:/var/lib/jmx
- ./backups:/backups