Skip to content

Commit

Permalink
Create a seperate compose file for IPv8
Browse files Browse the repository at this point in the history
  • Loading branch information
n9iels committed Jun 5, 2020
1 parent 57f3eac commit b09fa81
Show file tree
Hide file tree
Showing 6 changed files with 28 additions and 26 deletions.
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,12 @@ Alternatively, you can use an offline mock, which replicates the NLX environment

The clerk frontend will be available at `https://localhost:443`

### Running with IPv8
Optionally IPv8 attestation can be used in extend with Ephemeral. This is done as follows:

1. Create (or edit) the config files that are used by the application. These are located in `clerk-frontend/public` and `waardepapieren-service/configuration`. Set the `ENABLE_IPV8_ATTESTATION` to `true`
2. Run `docker-compose -f docker-compose-travis.yml -f docker-compose-ipv8.yml up`

# Running validator
The validator app is made with [Expo](https://expo.io/), which is a free and open-source react-native framework for mobile development. to run this on a mobile device, the expo-cli tool is required. to install this, run:
```bash
Expand Down
2 changes: 1 addition & 1 deletion clerk-frontend/public/clerk-frontend-config.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"DEFAULT_EPHEMERAL_WEBSOCKET_ENDPOINT" : "ws://localhost:3233",
"DEFAULT_CERTIFICATE_URL": "http://10.10.5.75:3000/certs/org.crt",
"SOURCE_ARGUMENT" : "BSN",
"ENABLE_IPV8_ATTESTATION": true,
"ENABLE_IPV8_ATTESTATION": false,
"IPV8_SERVICE_DID": "did:discipl:ipv8:TGliTmFDTFBLOs9RF8NUdlFdHcJaSZlNH4F0vuwSB3epF8s8ns1NcB4fWcKSQcuWuqj3C/RQIk3fEEwSwpodkfNmJW54loFalTI=",
"IPV8_SITE_DID": "did:discipl:ipv8:TGliTmFDTFBLOpd7y5Yd9NDKxelDmsACx9I6Go2cK4v8fKBIKzp0KiEjStqcAfSHFfk7KkqbUodAH0iX3nljnd7Y+bj8b0oFUCI=",
"IPV8_APP_DID": "did:discipl:ipv8:TGliTmFDTFBLOnj5S5VTowiIEV3QELnWusYPUBoiJ4vXtjeznhUUHdF6CbkMsP7H4PZwESO4LPHByqZHyEkjnM986nRQ2Bit76U=",
Expand Down
14 changes: 14 additions & 0 deletions docker-compose-ipv8.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
version: '3.5'
services:
ipv8:
build:
context: ipv8/.
ports:
- 14410:14410
- 14411:14411
- 14412:14412

networks:
default:
external:
name: waardepapieren
27 changes: 5 additions & 22 deletions docker-compose-travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,63 +6,46 @@ services:
- ./waardepapieren-service/system-test/ephemeral-certs:/ephemeral-certs:ro
- ./waardepapieren-service/configuration/:/app/configuration:ro
build: waardepapieren-service/.
depends_on:
- ipv8
networks:
- waardepapieren
ports:
- 3232:3232
- 3233:3233
environment:
- WAARDEPAPIEREN_CONFIG=/app/configuration/waardepapieren-config-compose-travis.json
# Ignore self-signed ephemeral cert issues
- NODE_TLS_REJECT_UNAUTHORIZED=0

waardepapieren-verblijfplaatshistorie-service:
volumes:
- ./waardepapieren-service/system-test/certs:/certs:ro
- ./waardepapieren-service/system-test/ephemeral-certs:/ephemeral-certs:ro
- ./waardepapieren-service/configuration/:/app/configuration:ro
build: waardepapieren-service/.
networks:
- waardepapieren
environment:
- WAARDEPAPIEREN_CONFIG=/app/configuration/waardepapieren-verblijfplaatshistorie-config-compose-travis.json
# Ignore self-signed ephemeral cert issues
- NODE_TLS_REJECT_UNAUTHORIZED=0

clerk-frontend:
build:
context: clerk-frontend/
args:
- CERTIFICATE_HOST=http://$CERT_HOST_IP:8880
- IPV8_HOST=http://$CERT_HOST_IP
depends_on:
- ipv8
- waardepapieren-service
networks:
- waardepapieren
ports:
- 443:443
- 8880:8880
healthcheck:
test: service nginx status
volumes:
- ./clerk-frontend/nginx/certs:/etc/nginx/certs:ro

mock-nlx:
build: mock-nlx/
networks:
- waardepapieren
ports:
- 80:80
ipv8:
build:
context: ipv8/.
networks:
- waardepapieren
ports:
- 14410:14410
- 14411:14411
- 14412:14412

networks:
waardepapieren:
name: waardepapieren
default:
name: waardepapieren
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
{"Geslachtsnaam" : "_embedded.ingeschrevenpersonen[0].naam.geslachtsnaam"},
{"Woonplaats verblijfadres" : "_embedded.ingeschrevenpersonen[0].verblijfplaats.gemeenteVanInschrijving.omschrijving"}
],
"ENABLE_IPV8_ATTESTATION": true,
"ENABLE_IPV8_ATTESTATION": false,
"IPV8_SERVICE_DID": "did:discipl:ipv8:TGliTmFDTFBLOs9RF8NUdlFdHcJaSZlNH4F0vuwSB3epF8s8ns1NcB4fWcKSQcuWuqj3C/RQIk3fEEwSwpodkfNmJW54loFalTI=",
"IPV8_SITE_DID": "did:discipl:ipv8:TGliTmFDTFBLOpd7y5Yd9NDKxelDmsACx9I6Go2cK4v8fKBIKzp0KiEjStqcAfSHFfk7KkqbUodAH0iX3nljnd7Y+bj8b0oFUCI=",
"IPV8_APP_DID": "did:discipl:ipv8:TGliTmFDTFBLOnj5S5VTowiIEV3QELnWusYPUBoiJ4vXtjeznhUUHdF6CbkMsP7H4PZwESO4LPHByqZHyEkjnM986nRQ2Bit76U="
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,5 @@
{"Voorletters" : "_embedded.ingeschrevenpersonen[0].naam.voorletters"},
{"Geslachtsnaam" : "_embedded.ingeschrevenpersonen[0].naam.geslachtsnaam"},
{"Woonplaats verblijfadres" : "_embedded.ingeschrevenpersonen[0].verblijfplaats.gemeenteVanInschrijving.omschrijving"}
],
"ENABLE_IPV8_ATTESTATION": false
]
}

0 comments on commit b09fa81

Please sign in to comment.