Skip to content

Commit

Permalink
feat: initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
eschrewe committed Feb 7, 2024
1 parent 285e666 commit 40d91f8
Show file tree
Hide file tree
Showing 6 changed files with 45 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,12 @@ public class VariablesService {
*/
private String apiKey;

@Value("${puris.dtr.url}")
/**
* The url of your decentralized DTR
*/
private String dtrUrl;

@Value("${edc.controlplane.key}")
/**
* The api key of your control plane
Expand Down
1 change: 1 addition & 0 deletions backend/src/main/resources/application.properties
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ puris.statusrequest.serverendpoint=${PURIS_STATUSREQUEST_SERVERENDPOINT:http://c
puris.frameworkagreement.use=${PURIS_FRAMEWORKAGREEMENT_USE:false}
puris.frameworkagreement.credential=${PURIS_FRAMEWORKAGREEMENT_CREDENTIAL:FrameworkAgreement.traceability}
puris.api.key=${PURIS_API_KEY:test}
puris.dtr.url=${PURIS_DTR_URL:http://localhost:4243}

# DB Configuration
spring.datasource.driver-class-name=${DATASOURCE_DRIVERCLASSNAME:org.postgresql.Driver}
Expand Down
35 changes: 35 additions & 0 deletions local/docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,21 @@ services:
- 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.3.16-M1
container_name: dtr-customer
ports:
- "127.0.0.1:4243:4243"
environment:
SPRING_DATASOURCE_DRIVERCLASSNAME: org.postgresql.Driver
SPRING_DATASOURCE_URL: jdbc:postgresql://customer-postgres:5432/dtr_database
SPRING_DATASOURCE_USERNAME: ${PG_USER}
SPRING_DATASOURCE_PASSWORD: ${PG_PW}
SPRING_PROFILES_ACTIVE: local
networks:
- miw-net
extra_hosts:
- "host.docker.internal:host-gateway" # Adjusts container's host file to allow for communication with docker-host machine

postgres-customer:
image: postgres:15.4-alpine
Expand All @@ -91,6 +106,8 @@ services:
cpus: "0.5"
security_opt:
- no-new-privileges:true
volumes:
- ./postgres/init-dtr.sql:/docker-entrypoint-initdb.d/init-dtr.sql

edc-customer-control-plane:
restart: on-failure
Expand Down Expand Up @@ -177,6 +194,22 @@ services:
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.3.16-M1
container_name: dtr-supplier
ports:
- "127.0.0.1:4244:4243"
environment:
SPRING_DATASOURCE_DRIVERCLASSNAME: org.postgresql.Driver
SPRING_DATASOURCE_URL: jdbc:postgresql://supplier-postgres:5432/dtr_database
SPRING_DATASOURCE_USERNAME: ${PG_USER}
SPRING_DATASOURCE_PASSWORD: ${PG_PW}
SPRING_PROFILES_ACTIVE: local
networks:
- miw-net
extra_hosts:
- "host.docker.internal:host-gateway" # Adjusts container's host file to allow for communication with docker-host machine

postgres-supplier:
image: postgres:15.4-alpine
container_name: supplier-postgres
Expand All @@ -200,6 +233,8 @@ services:
cpus: "0.5"
security_opt:
- no-new-privileges:true
volumes:
- ./postgres/init-dtr.sql:/docker-entrypoint-initdb.d/init-dtr.sql

edc-supplier-control-plane:
restart: on-failure
Expand Down
1 change: 1 addition & 0 deletions local/postgres/init-dtr.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
CREATE DATABASE dtr_database
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ puris.response.apiassetid=response-api-asset
puris.frameworkagreement.use=true
puris.frameworkagreement.crednetial=FrameworkAgreement.traceability
puris.api.key=${CUSTOMER_BACKEND_API_KEY}
puris.dtr.url=http://dtr-customer:4243

edc.controlplane.key=${EDC_API_PW}
edc.controlplane.management.url=http://customer-control-plane:8181/management
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ puris.response.apiassetid=response-api-asset
puris.frameworkagreement.use=true
puris.frameworkagreement.credential=FrameworkAgreement.traceability
puris.api.key=${SUPPLIER_BACKEND_API_KEY}
puris.dtr.url=http://dtr-supplier:4243

edc.controlplane.key=${EDC_API_PW}
edc.controlplane.management.url=http://supplier-control-plane:9181/management
Expand Down

0 comments on commit 40d91f8

Please sign in to comment.