Skip to content

Commit

Permalink
fix customers.json changes
Browse files Browse the repository at this point in the history
  • Loading branch information
gerardsn committed Jul 16, 2024
1 parent 967c584 commit 6501423
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 6 deletions.
3 changes: 3 additions & 0 deletions docker-compose/left/config/demo/customers.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"1":{"active":false,"city":"Enske","did":"did:web:node.left.local:iam:d52964da-2dfd-46d7-958f-7c2686bab02a","domain":"","id":1,"name":"Left"}
}
3 changes: 3 additions & 0 deletions docker-compose/right/config/demo/customers.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"1":{"active":false,"city":"Enske","did":"did:web:node.right.local:iam:f5332dcb-e39d-4d32-8de2-998a9b275559","domain":"","id":1,"name":"Right"}
}
14 changes: 8 additions & 6 deletions setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,6 @@ DID_RIGHT=$(docker exec nuts-demo-ehr-node-right-1 curl -sS -X POST "http://loca
echo "DID_LEFT: $DID_LEFT"
echo "DID_RIGHT: $DID_RIGHT"

echo "----------------------------------------"
echo "Creating customers.json for demo-ehr..."
echo "----------------------------------------"
printf "{\n\t\"1\":{\"active\":false,\"city\":\"Enske\",\"did\":\"$DID_LEFT\",\"domain\":\"\",\"id\":1,\"name\":\"Left\"}\n}\n" > ./docker-compose/left/config/demo/customers.json
printf "{\n\t\"1\":{\"active\":false,\"city\":\"Enske\",\"did\":\"$DID_RIGHT\",\"domain\":\"\",\"id\":1,\"name\":\"Right\"}\n}\n" > ./docker-compose/right/config/demo/customers.json

echo "----------------------------------------"
echo "Issuing NutsOrganizationCredentials..."
echo "----------------------------------------"
Expand Down Expand Up @@ -82,3 +76,11 @@ docker exec nuts-demo-ehr-node-left-1 curl -sS -X POST "http://localhost:8081/in
docker exec nuts-demo-ehr-node-left-1 curl -sS -X POST "http://localhost:8081/internal/vdr/v2/did/$DID_LEFT/service" -H "Content-Type: application/json" -d "{\"type\": \"eOverdracht-receiver\",\"serviceEndpoint\": {\"auth\": \"https://node.left.local/oauth2/$DID_LEFT/authorize\",\"notification\": \"https://left.local/web/external/transfer/notify\"}}"
docker exec nuts-demo-ehr-node-right-1 curl -sS -X POST "http://localhost:8081/internal/vdr/v2/did/$DID_RIGHT/service" -H "Content-Type: application/json" -d "{\"type\": \"eOverdracht-sender\",\"serviceEndpoint\": {\"auth\": \"https://node.right.local/oauth2/$DID_RIGHT/authorize\",\"fhir\": \"https://right.local/fhir/1\"}}"
docker exec nuts-demo-ehr-node-right-1 curl -sS -X POST "http://localhost:8081/internal/vdr/v2/did/$DID_RIGHT/service" -H "Content-Type: application/json" -d "{\"type\": \"eOverdracht-receiver\",\"serviceEndpoint\": {\"auth\": \"https://node.right.local/oauth2/$DID_RIGHT/authorize\",\"notification\": \"https://right.local/web/external/transfer/notify\"}}"

echo "----------------------------------------"
echo "Creating customers.json for demo-ehr..."
echo "----------------------------------------"
printf "{\n\t\"1\":{\"active\":false,\"city\":\"Enske\",\"did\":\"$DID_LEFT\",\"domain\":\"\",\"id\":1,\"name\":\"Left\"}\n}\n" > ./docker-compose/left/config/demo/customers.json
printf "{\n\t\"1\":{\"active\":false,\"city\":\"Enske\",\"did\":\"$DID_RIGHT\",\"domain\":\"\",\"id\":1,\"name\":\"Right\"}\n}\n" > ./docker-compose/right/config/demo/customers.json

docker compose restart # needed to load the new customers.json file

0 comments on commit 6501423

Please sign in to comment.