diff --git a/README.md b/README.md index b178b6350e253b30d3ed40bca5ea755c006a291e..cc516a20f605c0c90faaf38a5badd8500d334165 100644 --- a/README.md +++ b/README.md @@ -112,3 +112,14 @@ The Redis server can be reached at `localhost:6397` from your local machine. The services access Redis from their containers as `redis:6397` + +### Hashicorp Vault + +When the vault is first started with docker-compose on your local machine, +it's not yet initialized. To initialize it and get a vault token which can be used +by the [signer](../signer) service, you should open the Vault UI and follow the +initial steps to generate a token. The token then must be set as a value for the +ENV variable VAULT_TOKEN in [signer.env](./env/signer.env) + +Vault UI is exposed at http://0.0.0.0:8200/ui/vault + diff --git a/docker-compose.yml b/docker-compose.yml index 699bcc27cf71b670282b183e922fd77cb8f6b352..4a8142dd5d84cd599d7ad01f22d8ddc0c46daf50 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -58,6 +58,20 @@ services: - "8084:8080" depends_on: - mongo + - signer + + signer: + container_name: signer + build: + context: $GOPATH/src/code.vereign.com/gaiax/tsa/signer + dockerfile: deployment/compose/Dockerfile + volumes: + - "$GOPATH/src/code.vereign.com/gaiax/tsa/signer:/go/src/code.vereign.com/gaiax/tsa/signer" + env_file: + - ./env/signer.env + ports: + - "8085:8080" + depends_on: - vault didresolver: diff --git a/env/infohub.env b/env/infohub.env index 82eb17c8ede237e7208aac43ae34b0b686d83aa9..e2d3c2191a2b59bab0dfba6b67c0bb33c49b11b4 100644 --- a/env/infohub.env +++ b/env/infohub.env @@ -4,13 +4,10 @@ HTTP_PORT="8080" HTTP_IDLE_TIMEOUT="120s" HTTP_READ_TIMEOUT="10s" HTTP_WRITE_TIMEOUT="10s" -CACHE_ADDR="http://cache:8080" -POLICY_ADDR="http://policy:8080" MONGO_ADDR="mongodb://mongo:27017/infohub?replicaSet=rs0&authSource=admin" MONGO_USER="root" MONGO_PASS="root" -VAULT_ADDR="http://vault:8200" -VAULT_TOKEN="hvs.SaCAgNfJk91T1Qikb3XxH3ve" -VAULT_KEYNAME="signkey1" -CRED_ISSUER_NAME="ocm-123" -CRED_KEYNAME="signkey1" \ No newline at end of file +CACHE_ADDR="http://cache:8080" +POLICY_ADDR="http://policy:8080" +SIGNER_ADDR="http://signer:8080" +ISSUER_URI="did:ocm:123" diff --git a/env/signer.env b/env/signer.env new file mode 100644 index 0000000000000000000000000000000000000000..a01a0b39baf32d7b25e0b7fcf784cf8912bef7f0 --- /dev/null +++ b/env/signer.env @@ -0,0 +1,9 @@ +LOG_LEVEL="debug" +HTTP_HOST="" +HTTP_PORT="8080" +HTTP_IDLE_TIMEOUT="120s" +HTTP_READ_TIMEOUT="10s" +HTTP_WRITE_TIMEOUT="10s" +VAULT_ADDR="http://vault:8200" +VAULT_TOKEN="hvs.SaCAgNfJk91T1Qikb3XxH3ve" +VAULT_SIGNING_KEY="key1"