-
Notifications
You must be signed in to change notification settings - Fork 763
/
compose.yaml
218 lines (211 loc) · 5.29 KB
/
compose.yaml
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
version: "3.8"
services:
db:
image: mysql:8.2
env_file: docker_config_files/mysql/.env
container_name: grr-db
hostname: mysql-host
command: [
--max_allowed_packet=40M,
--log_bin_trust_function_creators=1,
--innodb_redo_log_capacity=167772160,
--innodb_log_file_size=2500M
]
restart: always
volumes:
- ./docker_config_files/mysql/init.sh:/docker-entrypoint-initdb.d/init.sh
- db_data:/var/lib/mysql:rw
ports:
- "3306:3306"
expose:
- "3306"
networks:
- server-network
healthcheck:
test: ["CMD", "mysqladmin", "ping", "-h", "localhost"]
timeout: 5s
retries: 10
grr-admin-ui:
build: .
image: ghcr.io/google/grr:latest
container_name: grr-admin-ui
hostname: admin-ui
depends_on:
db:
condition: service_healthy
fleetspeak-admin:
condition: service_started
volumes:
- ./docker_config_files:/configs/
# Mount a directory for the repacked client installers, so they
# can be used in the grr-client container which mounts the same volume.
- client_installers:/client_installers
ports:
- "8000:8000"
expose:
- "8000"
networks:
- server-network
entrypoint: [
"/bin/bash",
"-c",
"/configs/server/repack_clients.sh && grr_server -component admin_ui -config /configs/server/grr.server.yaml --verbose"
]
healthcheck:
# As soon as any files have been written to the /client_installer we
# assume the service is healthy.
test: "/configs/healthchecks/grr-admin-ui.sh"
timeout: 10s
retries: 10
develop:
watch:
- action: sync+restart
path: ./grr
target: /usr/src/grr/grr
ignore:
- client/
grr-fleetspeak-frontend:
build: .
image: ghcr.io/google/grr:latest
container_name: grr-fleetspeak-frontend
hostname: grr-fleetspeak-frontend
depends_on:
db:
condition: service_healthy
volumes:
- ./docker_config_files:/configs
expose:
- "11111"
restart: always
networks:
- server-network
command:
- -component
- frontend
- -config
- /configs/server/grr.server.yaml
- --verbose
develop:
watch:
- action: sync+restart
path: ./grr
target: /usr/src/grr/grr
ignore:
- client/
fleetspeak-admin:
image: ghcr.io/google/fleetspeak:latest
container_name: fleetspeak-admin
hostname: fleetspeak-admin
depends_on:
db:
condition: service_healthy
networks:
- server-network
expose:
- "4444"
volumes:
- ./docker_config_files:/configs
entrypoint: [
"server",
"-components_config",
"/configs/server/textservices/admin.components.config",
"-services_config",
"/configs/server/grr_frontend.service",
"-alsologtostderr",
"-v",
"1000"
]
fleetspeak-frontend:
image: ghcr.io/google/fleetspeak:latest
container_name: fleetspeak-frontend
hostname: fleetspeak-frontend
depends_on:
db:
condition: service_healthy
networks:
- server-network
expose:
- "4443"
- "10000"
volumes:
- ./docker_config_files:/configs
entrypoint: [
"server",
"-components_config",
"/configs/server/textservices/frontend.components.config",
"-services_config",
"/configs/server/grr_frontend.service",
"-alsologtostderr",
"-v",
"1000"
]
grr-worker:
build: .
image: ghcr.io/google/grr:latest
container_name: grr-worker
volumes:
- ./docker_config_files:/configs
hostname: grr-worker
depends_on:
db:
condition: service_healthy
restart: always
networks:
- server-network
command:
- -component
- worker
- -config
- /configs/server/grr.server.yaml
- --verbose
develop:
watch:
- action: sync+restart
path: ./grr
target: /usr/src/grr/grr
ignore:
- client/
grr-client:
build: .
image: ubuntu:22.04
container_name: grr-client
depends_on:
db:
condition: service_healthy
fleetspeak-frontend:
condition: service_started
grr-admin-ui:
# Service is healthy as soon as client installers are repacked.
condition: service_healthy
volumes:
- ./docker_config_files:/configs
# Mount the client_installers folder which contains the
# repacked templates written by the grr-admin-ui container
- client_installers:/client_installers
# Mount the client_state volume to preserve the clients state
# including the client_id across restarts.
- client_state:/client_state
networks:
- server-network
entrypoint: [
"/bin/bash",
"-c",
"/configs/client/install_client.sh && fleetspeak-client -config /configs/client/client.config"
]
healthcheck:
test: "/configs/healthchecks/grr-client.sh"
timeout: 10s
retries: 10
develop:
watch:
- action: sync+restart
path: ./grr
target: /usr/src/grr/grr
ignore:
- server/
volumes:
db_data:
client_installers:
client_state:
networks:
server-network: