-
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
212 lines (197 loc) · 6.17 KB
/
docker-compose.yml
File metadata and controls
212 lines (197 loc) · 6.17 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
services:
#####
# reverse proxy for the whole environment
#####
nginx:
profiles:
- dev
image: nginx:1.29.4-alpine
network_mode: host
environment:
- DEV_HOST=${DEV_HOST}
- NGINX_PORT1=${NGINX_PORT1}
- NGINX_PORT2=${NGINX_PORT2}
- DEV_API_PORT=${DEV_API_PORT}
- DEV_UI_PORT=${DEV_UI_PORT}
- SD_PORT=${SD_PORT}
- DF_PORT=${DF_PORT}
- EVENTS_PORT=${EVENTS_PORT}
- OAV_PORT=${OAV_PORT}
- REGISTRY_PORT=${REGISTRY_PORT}
volumes:
- ./dev/resources/nginx.conf.template:/etc/nginx/templates/default.conf.template:ro
#####
# related services from the data-fair stack
#####
simple-directory:
profiles:
- dev
image: ghcr.io/data-fair/simple-directory:8
network_mode: host
depends_on:
- mongo
environment:
- DEBUG=session
- PORT=${SD_PORT}
- CONTACT=contact@test.com
- ADMINS=["superadmin@test.com","test_superadmin@test.com"]
- PUBLIC_URL=http://${DEV_HOST}:${NGINX_PORT1}/simple-directory
- MAILDEV_ACTIVE=true
- MONGO_URL=mongodb://localhost:${MONGO_PORT}/simple-directory
- STORAGE_TYPE=file
- AUTHRATELIMIT_ATTEMPTS=500
- AUTHRATELIMIT_DURATION=30
- OBSERVER_ACTIVE=false
- MANAGE_PARTNERS=true
- MANAGE_DEPARTMENTS=true
- CIPHER_PASSWORD=dev
volumes:
- ./dev/resources/users.json:/app/data/users.json
- ./dev/resources/organizations.json:/app/data/organizations.json
data-fair:
profiles:
- dev
image: ghcr.io/data-fair/data-fair:5
restart: on-failure:10
network_mode: host
depends_on:
mongo:
condition: service_started
elasticsearch:
condition: service_healthy
environment:
- PORT=${DF_PORT}
- MONGO_URL=mongodb://localhost:${MONGO_PORT}/data-fair
- ES_HOST=http://localhost:${ES_PORT}
- DIRECTORY_URL=http://${DEV_HOST}:${NGINX_PORT1}/simple-directory
- PRIVATE_EVENTS_URL=http://localhost:${EVENTS_PORT}
- PRIVATE_DIRECTORY_URL=http://localhost:${SD_PORT}
- PUBLIC_URL=http://${DEV_HOST}:${NGINX_PORT1}/data-fair
- WS_PUBLIC_URL=ws://${DEV_HOST}:${NGINX_PORT1}/data-fair
- OBSERVER_ACTIVE=false
- PRIVATE_PROCESSINGS_URL=http://localhost:${DEV_API_PORT}
- SECRET_EVENTS=secret-events
- EXTRA_ADMIN_NAV_ITEMS=[{"id":"processingsAdminDoc","href":"http://${DEV_HOST}:${NGINX_PORT1}/openapi-viewer?urlType=processingsAdmin","icon":"mdi-cog-transfer-outline","title":"API Traitements périodiques"}]
- OPENAPI_VIEWER_URL=http://${DEV_HOST}:${NGINX_PORT1}/openapi-viewer/
- OPENAPI_VIEWER_V2=true
#####
# optional services
#####
events:
profiles:
- dev
image: ghcr.io/data-fair/events:main
network_mode: host
environment:
- PORT=${EVENTS_PORT}
- MONGO_URL=mongodb://localhost:${MONGO_PORT}/data-fair-events
- PRIVATE_DIRECTORY_URL=http://${DEV_HOST}:${NGINX_PORT1}/simple-directory
- SECRET_IDENTITIES=secret-identities
- SECRET_EVENTS=secret-events
- SECRET_SENDMAILS=secret-sendmails
- OBSERVER_ACTIVE=false
openapi-viewer:
profiles:
- dev
image: ghcr.io/data-fair/openapi-viewer:master
network_mode: host
environment:
- PORT=${OAV_PORT}
- USE_SIMPLE_DIRECTORY=true
- ALLOWED_URLS={"processings":"http://${DEV_HOST}:${NGINX_PORT1}/processings/api/v1/api-docs.json","processingsId":"http://${DEV_HOST}:${NGINX_PORT1}/processings/api/v1/processings/{id}/api-docs.json","processingsAdmin":"http://${DEV_HOST}:${NGINX_PORT1}/processings/api/v1/admin/api-docs.json"}
# registry-side dev container — same domain as processings under /registry
# so the UI can hit it directly with the SimpleDirectory session cookie.
registry:
profiles:
- dev
image: ghcr.io/data-fair/registry:feat-npm-noarch
network_mode: host
depends_on:
- mongo
- simple-directory
environment:
- PORT=${REGISTRY_PORT}
- MONGO_URL=mongodb://localhost:${MONGO_PORT}/data-fair-registry
- PRIVATE_DIRECTORY_URL=http://localhost:${SD_PORT}
- PUBLIC_URL=http://${DEV_HOST}:${NGINX_PORT1}/registry
- SECRET_INTERNAL_SERVICES=secret-registry-internal
- CIPHER_PASSWORD=1234567890123456789012345678901234567890
- API_KEYS_SALT=1234567890123456789012345678901234567890
- OBSERVER_ACTIVE=false
- FILES_STORAGE=fs
# /tmp is world-writable in the registry image; the container runs as
# uid 1000 ("node") and can't write to a docker-managed volume on /app/data
# without an init step. Tarballs are throwaway in dev/test so we just keep
# them inside the container and drop the named volume.
- DATA_DIR=/tmp/registry-data
#####
# db and search engine
#####
elasticsearch:
profiles:
- dev
image: ghcr.io/data-fair/elasticsearch:7.x
ports:
- ${ES_PORT}:9200
environment:
- discovery.type=single-node
- xpack.security.enabled=false
- ES_HEAP_SIZE=128m
- "ES_JAVA_OPTS=-Xms128m -Xmx128m -server"
volumes:
- elasticsearch-data:/usr/share/elasticsearch/data
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:9200"]
start_period: 10s
timeout: 5s
interval: 2s
retries: 50
mongo:
profiles:
- dev
image: mongo:4.2
ports:
- ${MONGO_PORT}:27017
volumes:
- mongo-data:/data/db
#####
# Api and worker in docker mode
#####
main:
build:
context: .
dockerfile: Dockerfile
target: main
args:
NODE_ENV: development
depends_on:
- data-fair
profiles:
- testImages
image: datafair/processings/main:dev
network_mode: host
environment:
- NODE_ENV=development
volumes:
- processings-data:/app/data
worker:
build:
context: .
dockerfile: Dockerfile
target: worker
args:
NODE_ENV: development
depends_on:
- data-fair
profiles:
- testImages
image: datafair/processings/worker:dev
network_mode: host
environment:
- NODE_ENV=development
volumes:
- processings-data:/app/data
volumes:
elasticsearch-data:
mongo-data:
processings-data: