Skip to content
Snippets Groups Projects
Commit 7f0b2fc3 authored by Yordan Kinkov's avatar Yordan Kinkov
Browse files

Merge branch '3-add-DID-resolver-to-workspace' into 'main'

Add DID resolver service in workspace

Closes #3

See merge request !3
parents 4ef7db90 d22dd751
No related branches found
No related tags found
1 merge request!3Add DID resolver service in workspace
......@@ -31,6 +31,13 @@ with environment variables which will be injected in its container.
./setup.sh
```
* set the services you would like to use in the docker-compose.yml file, defaults is **infohub**
* set needed environment variables in an `.env` file and add the file path in `export-env.sh` script
* export environment variables:
```
. ./export-env.sh
```
* run docker compose:
```
docker-compose up
......@@ -38,7 +45,31 @@ with environment variables which will be injected in its container.
## 3rd Party Services
#### Redis
### DID Resolver service
The DID Resolver service can be reached at `localhost:9090` from your
local machine.
Example usage:
```
curl -X GET http://localhost:9090/1.0/identifiers/did:indy:idunion:BDrEcHc8Tb4Lb2VyQZWEDE
curl -X GET http://localhost:9090/1.0/identifiers/did:key:z6Mkfriq1MqLBoPWecGoDLjguo1sB9brj6wT3qZ5BxkKpuP6
curl -X GET http://localhost:9090/1.0/identifiers/did:schema:public-ipfs:json-schema:Qma2beXKwZeiUXcaRaQKwbBV1TqyiJnsMTYExUTdQue43J
curl -X GET http://localhost:9090/1.0/identifiers/did:web:did.actor:alice
curl -X GET http://localhost:9090/1.0/identifiers/did:sov:WRfXPg8dantKVubE3HX8pw
```
In order to support more DID methods refer to currently supported ones here:
```
https://github.com/decentralized-identity/universal-resolver/blob/main/docker-compose.yml
```
Needed env variables are here:
```
https://github.com/decentralized-identity/universal-resolver/blob/main/.env
```
The services access DID resolver from their containers as `uni-resolver-web:8080`
### Redis
The Redis server can be reached at `localhost:6397` from your
local machine.
......
......@@ -6,3 +6,38 @@ services:
container_name: redis
ports:
- "6379:6379"
uni-resolver-web:
image: universalresolver/uni-resolver-web:latest
ports:
- "9090:8080"
uni-resolver-driver-did-uport:
image: uport/uni-resolver-driver-did-uport:2.3.0
ports:
- "9091:8081"
driver-did-sov:
image: universalresolver/driver-did-sov:latest
environment:
uniresolver_driver_did_sov_libIndyPath: ${uniresolver_driver_did_sov_libIndyPath}
uniresolver_driver_did_sov_poolConfigs: ${uniresolver_driver_did_sov_poolConfigs}
uniresolver_driver_did_sov_poolVersions: ${uniresolver_driver_did_sov_poolVersions}
uniresolver_driver_did_sov_walletName: ${uniresolver_driver_did_sov_walletName}
ports:
- "9092:8080"
driver-did-key:
image: universalresolver/driver-did-key:latest
ports:
- "9093:8080"
schema-registry-did-resolver:
image: 51nodes/schema-registry-did-resolver:0.1.1
ports:
- "9094:8080"
indy-did-driver:
image: ghcr.io/idunion/indy-did-resolver/indy-did-driver:latest
ports:
- "9095:8080"
\ No newline at end of file
uniresolver_driver_did_sov_libIndyPath=
uniresolver_driver_did_sov_poolConfigs=_;./sovrin/_.txn;staging;./sovrin/staging.txn;builder;./sovrin/builder.txn;danube;./sovrin/danube.txn;idu;./sovrin/idu.txn;eesdi;./sovrin/eesdi.txn;indicio;./sovrin/indicio.txn;indicio:test;./sovrin/indicio-test.txn;indicio:demo;./sovrin/indicio-demo.txn;bbu;./sovrin/bbu.txn
uniresolver_driver_did_sov_poolVersions=_;2;staging;2;builder;2;danube;2;idu;2;eesdi;2;indicio;2;indicio:test;2;indicio:demo;2;bbu;2
uniresolver_driver_did_sov_walletName=default
#!/bin/sh
## Usage:
## . ./export-env.sh
envFiles=(
"env/resolver.env"
)
unamestr=$(uname)
for f in ${envFiles[@]}; do
echo "Exporting $f ..."
if [ "$unamestr" = 'Linux' ]; then
export $(grep -v '^#' $f | xargs -d '\n')
elif [ "$unamestr" = 'FreeBSD' ] || [ "$unamestr" = 'Darwin' ]; then
export $(grep -v '^#' $f | xargs -0)
fi
done
echo "Done"
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment