-
Notifications
You must be signed in to change notification settings - Fork 91
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
291 lines (276 loc) · 8.99 KB
/
docker-compose.yml
File metadata and controls
291 lines (276 loc) · 8.99 KB
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
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
services:
fides:
container_name: fides
image: ethyca/fides:local
command: uvicorn --host 0.0.0.0 --port 8080 --reload --reload-dir src --reload-dir data --reload-include='*.yml' fides.api.main:app
healthcheck:
test: ["CMD", "curl", "-f", "http://0.0.0.0:8080/health"]
interval: 20s
timeout: 5s
retries: 10
ports:
- "8080:8080"
depends_on:
fides-db:
condition: service_healthy
redis:
condition: service_started
expose:
- 8080
env_file:
- .env
environment:
FIDES__CONFIG_PATH: ${FIDES__CONFIG_PATH:-/fides/.fides/fides.toml}
FIDES__CLI__ANALYTICS_ID: ${FIDES__CLI__ANALYTICS_ID-}
FIDES__CLI__SERVER_HOST: "fides"
FIDES__CLI__SERVER_PORT: "8080"
FIDES__DATABASE__SERVER: "fides-db"
FIDES__DEV_MODE: "True"
FIDES__LOGGING__COLORIZE: "True"
FIDES__USER__ANALYTICS_OPT_OUT: "True"
# Default auth rate limit; override via env for tests/perf as needed
FIDES__SECURITY__AUTH_RATE_LIMIT: ${FIDES__SECURITY__AUTH_RATE_LIMIT:-10/minute}
FIDES__SECURITY__BASTION_SERVER_HOST: ${FIDES__SECURITY__BASTION_SERVER_HOST-}
FIDES__SECURITY__BASTION_SERVER_SSH_USERNAME: ${FIDES__SECURITY__BASTION_SERVER_SSH_USERNAME-}
FIDES__SECURITY__BASTION_SERVER_SSH_PRIVATE_KEY: ${FIDES__SECURITY__BASTION_SERVER_SSH_PRIVATE_KEY-}
SAAS_OP_SERVICE_ACCOUNT_TOKEN: ${SAAS_OP_SERVICE_ACCOUNT_TOKEN-}
SAAS_SECRETS_OP_VAULT_ID: ${SAAS_SECRETS_OP_VAULT_ID-}
volumes:
- type: bind
source: .
target: /fides
read_only: False
fides-ui:
image: ethyca/fides:local-ui
command: npm run dev-admin-ui
expose:
- 3000
ports:
- "3000:3000"
volumes:
- type: bind
source: .
target: /fides
read_only: False
# do not volume mount over the node_modules
- /fides/clients/node_modules
- /fides/clients/admin-ui/node_modules
environment:
- NEXT_PUBLIC_FIDESCTL_API_SERVER=http://fides:8080
fides-pc:
image: ethyca/fides:local-pc
command: npm run dev-pc
expose:
- 3001
ports:
- "3001:3001"
volumes:
- type: bind
source: .
target: /fides
read_only: False
# do not volume mount over the node_modules
- /fides/clients/node_modules
- /fides/clients/privacy-center/node_modules
fides-db:
image: postgres:16
healthcheck:
test: ["CMD-SHELL", "pg_isready -U postgres"]
interval: 15s
timeout: 5s
retries: 5
volumes:
- postgres:/var/lib/postgresql/data
expose:
- 5432
ports:
- "5432:5432"
environment:
POSTGRES_USER: "postgres"
POSTGRES_PASSWORD: "fides"
POSTGRES_DB: "fides"
deploy:
placement:
constraints:
- node.labels.fides.app-db-data == true
docs:
build:
context: .
dockerfile: docs/fides/Dockerfile
volumes:
- ./docs/fides:/docs
- ./:/fides
expose:
- 8000
ports:
- "8000:8000"
environment:
FIDES__DEV_MODE: True
FIDES__CLI__ANALYTICS_ID: ${FIDES__CLI__ANALYTICS_ID-}
# Required security env vars
FIDES__SECURITY__APP_ENCRYPTION_KEY: OLMkv91j8DHiDAULnK5Lxx3kSCov30b3
FIDES__SECURITY__OAUTH_ROOT_CLIENT_ID: fidesadmin
FIDES__SECURITY__OAUTH_ROOT_CLIENT_SECRET: fidesadminsecret
FIDES__SECURITY__DRP_JWT_SECRET: secret
worker-other:
image: ethyca/fides:local
command: fides worker --exclude-queues=fides.dsr,fides.privacy_preferences,fides.privacy_request_exports,fides.privacy_request_ingestion,fidesplus.discovery_monitors_detection,fidesplus.discovery_monitors_classification,fidesplus.discovery_monitors_promotion # exclude DSRs, privacy preferences, and discovery monitor queues
depends_on:
redis:
condition: service_started
restart: always
healthcheck:
test: ["CMD", "celery", "-A", "fides.api.tasks", "inspect", "ping"]
start_period: 60s
interval: 20s
timeout: 5s
retries: 10
environment:
FIDES__CONFIG_PATH: ${FIDES__CONFIG_PATH:-/fides/.fides/fides.toml}
FIDES__LOGGING__COLORIZE: "True"
FIDES__USER__ANALYTICS_OPT_OUT: "True"
# The default HTTP health check port is 9000, override it here to ensure that
# the override works as expected.
FIDES__CELERY__HEALTHCHECK_PORT: "9001"
expose:
- 9001
volumes:
- type: bind
source: ./
target: /fides
read_only: False
- /fides/src/fides.egg-info
worker-privacy-preferences:
extends:
service: worker-other
command: fides worker --queues=fides.privacy_preferences,fides.privacy_request_exports,fides.privacy_request_ingestion
worker-dsr:
extends:
service: worker-other
healthcheck:
test: [ "CMD", "curl", "-f", "http://localhost:9001/"]
command: fides worker --queues=fides.dsr
redis:
image: "redis:8.0-alpine"
# AUTH option #1: no authentication at all
# command: redis-server
# AUTH option #2: require password
command: redis-server --requirepass redispassword
# AUTH option #3: Redis ACL defined in redis.conf
# command: redis-server /usr/local/etc/redis/redis.conf
expose:
- 6379
ports:
- "0.0.0.0:6379:6379"
volumes:
# Mount a redis.conf file for configuration
# NOTE: Only used by "AUTH option #3" above!
- type: bind
source: ./docker/redis
target: /usr/local/etc/redis
read_only: False
flower:
image: mher/flower:2.0
command: celery flower --broker=redis://:redispassword@redis:6379/0
ports:
- "5555:5555"
depends_on:
- redis
environment:
- CELERY_BROKER_URL=redis://:redispassword@redis:6379/0
- CELERY_RESULT_BACKEND=redis://:redispassword@redis:6379/0
# Cluster services for nginx load balancing
fides-1:
container_name: fides-1
image: ethyca/fides:local
command: uvicorn --host 0.0.0.0 --port 8080 --reload --reload-dir src --reload-dir data --reload-include='*.yml' fides.api.main:app
healthcheck:
test: ["CMD", "curl", "-f", "http://0.0.0.0:8080/health"]
interval: 20s
timeout: 5s
retries: 10
ports:
- "8081:8080"
depends_on:
fides-db:
condition: service_healthy
redis:
condition: service_started
expose:
- 8080
env_file:
- .env
environment:
FIDES__CONFIG_PATH: ${FIDES__CONFIG_PATH:-/fides/.fides/fides.toml}
FIDES__CLI__ANALYTICS_ID: ${FIDES__CLI__ANALYTICS_ID-}
FIDES__CLI__SERVER_HOST: "fides"
FIDES__CLI__SERVER_PORT: "8080"
FIDES__DATABASE__SERVER: "fides-db"
FIDES__DEV_MODE: "True"
FIDES__LOGGING__COLORIZE: "True"
FIDES__USER__ANALYTICS_OPT_OUT: "True"
FIDES__SECURITY__BASTION_SERVER_HOST: ${FIDES__SECURITY__BASTION_SERVER_HOST-}
FIDES__SECURITY__BASTION_SERVER_SSH_USERNAME: ${FIDES__SECURITY__BASTION_SERVER_SSH_USERNAME-}
FIDES__SECURITY__BASTION_SERVER_SSH_PRIVATE_KEY: ${FIDES__SECURITY__BASTION_SERVER_SSH_PRIVATE_KEY-}
SAAS_OP_SERVICE_ACCOUNT_TOKEN: ${SAAS_OP_SERVICE_ACCOUNT_TOKEN-}
SAAS_SECRETS_OP_VAULT_ID: ${SAAS_SECRETS_OP_VAULT_ID-}
volumes:
- type: bind
source: .
target: /fides
read_only: False
fides-2:
container_name: fides-2
image: ethyca/fides:local
command: uvicorn --host 0.0.0.0 --port 8080 --reload --reload-dir src --reload-dir data --reload-include='*.yml' fides.api.main:app
healthcheck:
test: ["CMD", "curl", "-f", "http://0.0.0.0:8080/health"]
interval: 20s
timeout: 5s
retries: 10
ports:
- "8082:8080"
depends_on:
fides-db:
condition: service_healthy
redis:
condition: service_started
expose:
- 8080
env_file:
- .env
environment:
FIDES__CONFIG_PATH: ${FIDES__CONFIG_PATH:-/fides/.fides/fides.toml}
FIDES__CLI__ANALYTICS_ID: ${FIDES__CLI__ANALYTICS_ID-}
FIDES__CLI__SERVER_HOST: "fides"
FIDES__CLI__SERVER_PORT: "8080"
FIDES__DATABASE__SERVER: "fides-db"
FIDES__DEV_MODE: "True"
FIDES__LOGGING__COLORIZE: "True"
FIDES__USER__ANALYTICS_OPT_OUT: "True"
FIDES__SECURITY__BASTION_SERVER_HOST: ${FIDES__SECURITY__BASTION_SERVER_HOST-}
FIDES__SECURITY__BASTION_SERVER_SSH_USERNAME: ${FIDES__SECURITY__BASTION_SERVER_SSH_USERNAME-}
FIDES__SECURITY__BASTION_SERVER_SSH_PRIVATE_KEY: ${FIDES__SECURITY__BASTION_SERVER_SSH_PRIVATE_KEY-}
SAAS_OP_SERVICE_ACCOUNT_TOKEN: ${SAAS_OP_SERVICE_ACCOUNT_TOKEN-}
SAAS_SECRETS_OP_VAULT_ID: ${SAAS_SECRETS_OP_VAULT_ID-}
volumes:
- type: bind
source: .
target: /fides
read_only: False
fides-proxy:
container_name: fides-proxy
image: nginx:latest
ports:
- "8083:8080"
volumes:
- ./docker/nginx/nginx.conf:/etc/nginx/nginx.conf:ro
depends_on:
fides-1:
condition: service_healthy
fides-2:
condition: service_healthy
volumes:
postgres: null
networks:
fides_network: