-
Notifications
You must be signed in to change notification settings - Fork 9
/
docker-compose.yaml
317 lines (305 loc) · 11.4 KB
/
docker-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
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
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
#
# Copyright (c) 2023 Volkswagen AG
# Copyright (c) 2023 Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V. (represented by Fraunhofer ISST)
# Copyright (c) 2023 Contributors to the Eclipse Foundation
#
# See the NOTICE file(s) distributed with this work for additional
# information regarding copyright ownership.
#
# This program and the accompanying materials are made available under the
# terms of the Apache License, Version 2.0 which is available at
# https://www.apache.org/licenses/LICENSE-2.0.
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
#
# SPDX-License-Identifier: Apache-2.0
#
version: "3"
services:
puris-frontend-customer:
image: puris-frontend:dev
container_name: customer-frontend
ports:
- "127.0.0.1:3000:8080"
environment:
- APP_NAME=PURIS Customer
- BACKEND_BASE_URL=http://localhost:8081/catena/
- BACKEND_API_KEY=${CUSTOMER_BACKEND_API_KEY}
- ENDPOINT_MATERIALS=stockView/materials
- ENDPOINT_PRODUCTS=stockView/products
- ENDPOINT_MATERIAL_STOCKS=stockView/material-stocks
- ENDPOINT_PRODUCT_STOCKS=stockView/product-stocks
- ENDPOINT_CUSTOMER=stockView/customer?ownMaterialNumber=
- ENDPOINT_SUPPLIER=stockView/supplier?ownMaterialNumber=
- ENDPOINT_REPORTED_MATERIAL_STOCKS=stockView/reported-material-stocks?ownMaterialNumber=
- ENDPOINT_REPORTED_PRODUCT_STOCKS=stockView/reported-product-stocks?ownMaterialNumber=
- ENDPOINT_UPDATE_REPORTED_MATERIAL_STOCKS=stockView/update-reported-material-stocks?ownMaterialNumber=
- ENDPOINT_UPDATE_REPORTED_PRODUCT_STOCKS=stockView/update-reported-product-stocks?ownMaterialNumber=
- ENDPOINT_ERP_SCHEDULE_UPDATE=erp-adapter/trigger
- ENDPOINT_PARTNER=partners
- ENDPOINT_DEMAND=demand
- ENDPOINT_PRODUCTION=production
- ENDPOINT_PRODUCTION_RANGE=production/range
- ENDPOINT_DELIVERY=delivery
- IDP_DISABLE=true
- NGINX_RATE_LIMIT=10m
- NGINX_BURST=30
- NGINX_RATE=10r/s
networks:
- miw-net
extra_hosts:
- "host.docker.internal:host-gateway" # Adjusts container's host file to allow for communication with docker-host machine
puris-backend-customer:
image: puris-backend:dev
container_name: customer-backend
depends_on:
edc-customer-control-plane:
condition: service_started #service_healthy
postgres-all:
condition: service_healthy
dtr-customer:
condition: service_healthy
ports:
- "127.0.0.1:8081:8081" # expose port of server.port
env_file:
- ./tractus-x-edc/config/customer/puris-backend.properties
environment:
SPRING_DATASOURCE_URL: jdbc:postgresql://postgres-all:5432/puris_customer
SPRING_DATASOURCE_USERNAME: ${PG_USER}
SPRING_DATASOURCE_PASSWORD: ${PG_PW}
networks:
- miw-net
extra_hosts:
- "host.docker.internal:host-gateway" # Adjusts container's host file to allow for communication with docker-host machine
dtr-customer:
image: tractusx/sldt-digital-twin-registry:0.5.0
container_name: dtr-customer
depends_on:
postgres-all:
condition: service_healthy
healthcheck:
test: ["CMD-SHELL", "wget -q --spider http://dtr-customer:4243/actuator/health/readiness"]
interval: 4s
timeout: 3s
retries: 20
ports:
- "127.0.0.1:4243:4243"
environment:
SPRING_DATASOURCE_DRIVERCLASSNAME: org.postgresql.Driver
SPRING_DATASOURCE_URL: jdbc:postgresql://postgres-all:5432/dtr_customer
SPRING_DATASOURCE_USERNAME: ${PG_USER}
SPRING_DATASOURCE_PASSWORD: ${PG_PW}
REGISTRY_IDM_OWNING_TENANT_ID: ${CUSTOMER_BPNL}
REGISTRY_USE_GRANULAR_ACCESS_CONTROL: false
JAVA_TOOL_OPTIONS: "-Xms512m -Xmx1024m"
# deactivate oauth idp by commenting out SPRING_PROFILES_ACTIVE
# SPRING_PROFILES_ACTIVE: local
# Note: Currently DTR only allows one client, thus manage client must be used for all.
REGISTRY_IDM_PUBLIC_CLIENT_ID: ${KC_MANAGE_CLIENT_ID}
SPRING_SECURITY_OAUTH2_RESOURCESERVER_JWT_ISSUER_URI: "http://keycloak:8080/realms/Customer"
networks:
- miw-net
extra_hosts:
- "host.docker.internal:host-gateway" # Adjusts container's host file to allow for communication with docker-host machine
postgres-all:
image: postgres:15.4-alpine
container_name: postgres-all
environment:
POSTGRES_DB: puris_customer # create puris db for customer, rest init script
POSTGRES_USER: ${PG_USER}
POSTGRES_PASSWORD: ${PG_PW}
ports:
- "127.0.0.1:5433:5432"
healthcheck:
test: ["CMD-SHELL", "pg_isready -d puris_customer -U ${PG_USER}"]
interval: 4s
timeout: 3s
retries: 15
networks:
- miw-net
deploy:
resources:
limits:
memory: 512mb
cpus: "0.5"
security_opt:
- no-new-privileges:true
volumes:
- ./postgres/init-db.sql:/docker-entrypoint-initdb.d/init-db.sql
edc-customer-control-plane:
depends_on:
postgres-all:
condition: service_healthy
restart: on-failure
extends:
file: ./tractus-x-edc/docker-compose.yaml
service: control-plane
container_name: customer-control-plane
env_file:
- ./tractus-x-edc/config/customer/control-plane.properties
ports:
- "127.0.0.1:8180:8180"
- "127.0.0.1:8181:8181"
- "127.0.0.1:8182:8182"
- "127.0.0.1:8183:8183"
- "127.0.0.1:8184:8184"
networks:
- miw-net
extra_hosts:
- "host.docker.internal:host-gateway" # Adjusts container's host file to allow for communication with docker-host machine
edc-customer-data-plane:
depends_on:
postgres-all:
condition: service_healthy
restart: on-failure
extends:
file: ./tractus-x-edc/docker-compose.yaml
service: data-plane
container_name: customer-data-plane
ports:
- "127.0.0.1:8280:8280"
- "127.0.0.1:8281:8281"
- "127.0.0.1:8283:8283"
- "127.0.0.1:8285:8285"
- "127.0.0.1:8299:8299"
env_file:
- ./tractus-x-edc/config/customer/data-plane.properties
networks:
- miw-net
extra_hosts:
- "host.docker.internal:host-gateway" # Adjusts container's host file to allow for communication with docker-host machine
puris-frontend-supplier:
image: puris-frontend:dev
container_name: supplier-frontend
ports:
- "127.0.0.1:3001:8080"
environment:
- APP_NAME=PURIS Customer
- BACKEND_BASE_URL=http://localhost:8082/catena/
- BACKEND_API_KEY=${SUPPLIER_BACKEND_API_KEY}
- ENDPOINT_MATERIALS=stockView/materials
- ENDPOINT_PRODUCTS=stockView/products
- ENDPOINT_MATERIAL_STOCKS=stockView/material-stocks
- ENDPOINT_PRODUCT_STOCKS=stockView/product-stocks
- ENDPOINT_CUSTOMER=stockView/customer?ownMaterialNumber=
- ENDPOINT_SUPPLIER=stockView/supplier?ownMaterialNumber=
- ENDPOINT_REPORTED_MATERIAL_STOCKS=stockView/reported-material-stocks?ownMaterialNumber=
- ENDPOINT_REPORTED_PRODUCT_STOCKS=stockView/reported-product-stocks?ownMaterialNumber=
- ENDPOINT_UPDATE_REPORTED_MATERIAL_STOCKS=stockView/update-reported-material-stocks?ownMaterialNumber=
- ENDPOINT_UPDATE_REPORTED_PRODUCT_STOCKS=stockView/update-reported-product-stocks?ownMaterialNumber=
- ENDPOINT_ERP_SCHEDULE_UPDATE=erp-adapter/trigger
- ENDPOINT_PARTNER=partners
- ENDPOINT_DEMAND=demand
- ENDPOINT_PRODUCTION=production
- ENDPOINT_PRODUCTION_RANGE=production/range
- ENDPOINT_DELIVERY=delivery
- IDP_DISABLE=true
- NGINX_RATE_LIMIT=10m
- NGINX_BURST=30
- NGINX_RATE=10r/s
networks:
- miw-net
extra_hosts:
- "host.docker.internal:host-gateway" # Adjusts container's host file to allow for communication with docker-host machine
puris-backend-supplier:
image: puris-backend:dev
container_name: supplier-backend
depends_on:
edc-supplier-control-plane:
condition: service_started #service_healthy
postgres-all:
condition: service_healthy
dtr-supplier:
condition: service_healthy
ports:
- "127.0.0.1:8082:8082"
env_file:
- ./tractus-x-edc/config/supplier/puris-backend.properties
environment:
SPRING_DATASOURCE_URL: jdbc:postgresql://postgres-all:5432/puris_supplier
SPRING_DATASOURCE_USERNAME: ${PG_USER}
SPRING_DATASOURCE_PASSWORD: ${PG_PW}
networks:
- miw-net
extra_hosts:
- "host.docker.internal:host-gateway" # Adjusts container's host file to allow for communication with docker-host machine
dtr-supplier:
image: tractusx/sldt-digital-twin-registry:0.5.0
container_name: dtr-supplier
depends_on:
postgres-all:
condition: service_healthy
healthcheck:
test: ["CMD-SHELL", "wget -q --spider http://dtr-supplier:4243/actuator/health/readiness"]
interval: 4s
timeout: 3s
retries: 20
ports:
- "127.0.0.1:4244:4243"
environment:
SPRING_DATASOURCE_DRIVERCLASSNAME: org.postgresql.Driver
SPRING_DATASOURCE_URL: jdbc:postgresql://postgres-all:5432/dtr_supplier
SPRING_DATASOURCE_USERNAME: ${PG_USER}
SPRING_DATASOURCE_PASSWORD: ${PG_PW}
REGISTRY_IDM_OWNING_TENANT_ID: ${SUPPLIER_BPNL}
REGISTRY_USE_GRANULAR_ACCESS_CONTROL: false
JAVA_TOOL_OPTIONS: "-Xms512m -Xmx1024m"
# deactivate oauth idp by commenting out SPRING_PROFILES_ACTIVE
# SPRING_PROFILES_ACTIVE: local
# Note: Currently DTR only allows one client, thus manage client must be used for all.
REGISTRY_IDM_PUBLIC_CLIENT_ID: ${KC_MANAGE_CLIENT_ID}
SPRING_SECURITY_OAUTH2_RESOURCESERVER_JWT_ISSUER_URI: "http://keycloak:8080/realms/Supplier"
networks:
- miw-net
extra_hosts:
- "host.docker.internal:host-gateway" # Adjusts container's host file to allow for communication with docker-host machine
edc-supplier-control-plane:
depends_on:
postgres-all:
condition: service_healthy
restart: on-failure
extends:
file: ./tractus-x-edc/docker-compose.yaml
service: control-plane
container_name: supplier-control-plane
ports:
- "127.0.0.1:9180:9180"
- "127.0.0.1:9181:9181"
- "127.0.0.1:9182:9182"
- "127.0.0.1:9183:9183"
- "127.0.0.1:9184:9184"
- "127.0.0.1:1044:1044"
env_file:
- ./tractus-x-edc/config/supplier/control-plane.properties
networks:
- miw-net
extra_hosts:
- "host.docker.internal:host-gateway" # Adjusts container's host file to allow for communication with docker-host machine
edc-supplier-data-plane:
depends_on:
postgres-all:
condition: service_healthy
restart: on-failure
extends:
file: ./tractus-x-edc/docker-compose.yaml
service: data-plane
container_name: supplier-data-plane
ports:
- "127.0.0.1:9280:9280"
- "127.0.0.1:9281:9281"
- "127.0.0.1:9283:9283"
- "127.0.0.1:9285:9285"
- "127.0.0.1:9299:9299"
env_file:
- ./tractus-x-edc/config/supplier/data-plane.properties
networks:
- miw-net
extra_hosts:
- "host.docker.internal:host-gateway" # Adjusts container's host file to allow for communication with docker-host machine
networks:
miw-net:
external: true