Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Getting started #55

Open
Echsecutor opened this issue Jun 3, 2024 · 3 comments
Open

Getting started #55

Echsecutor opened this issue Jun 3, 2024 · 3 comments

Comments

@Echsecutor
Copy link
Contributor

Echsecutor commented Jun 3, 2024

I would appreciate a brief getting started paragraph in the README or from running docker linked therein.

A simple minded

git clone [email protected]:openwallet-foundation-labs/credhub.git
cd credhub
cp .env.example .env
docker compose up

does download the images and start the containers, but I am getting a few errors among which at least those look critical:

verifier-backend-1   | node:fs:1369
verifier-backend-1   |   path = getValidatedPath(path);
verifier-backend-1   |          ^
verifier-backend-1   | 
verifier-backend-1   | TypeError [ERR_INVALID_ARG_TYPE]: The "path" argument must be of type string or an instance of Buffer or URL. Received undefined
verifier-backend-1   |     at mkdirSync (node:fs:1369:10)
verifier-backend-1   |     at FileSystemKeyService.getKeys (/home/node/app/main.js:796:37)
verifier-backend-1   |     at FileSystemKeyService.init (/home/node/app/main.js:783:54)
verifier-backend-1   |     at FileSystemKeyService.onModuleInit (/home/node/app/main.js:777:20)
...
verifier-backend-1 exited with code 1

and

verifier-backend-1   | /home/node/app/node_modules/.pnpm/@[email protected]_@[email protected][email protected]/node_modules/@nestjs/config/dist/config.module.js:86
verifier-backend-1   |                 throw new Error(`Config validation error: ${error.message}`);
verifier-backend-1   |                 ^
verifier-backend-1   | 
verifier-backend-1   | Error: Config validation error: "CREDENTIALS_FOLDER" is required
verifier-backend-1   |     at ConfigModule.forRoot (/home/node/app/node_modules/.pnpm/@[email protected]_@[email protected][email protected]/node_modules/@nestjs/config/dist/config.module.js:86:23)
...
verifier-backend-1 exited with code 1

and

...
holder-backend-1     | [Nest] 9  - 06/03/2024, 8:24:23 PM   ERROR [TypeOrmModule] Unable to connect to the database. Retrying (8)...
holder-backend-1     | AggregateError [ECONNREFUSED]: 
holder-backend-1     |     at internalConnectMultiple (node:net:1117:18)
holder-backend-1     |     at afterConnectMultiple (node:net:1684:7)
holder-backend-1     | [Nest] 9  - 06/03/2024, 8:24:26 PM   ERROR [TypeOrmModule] Unable to connect to the database. Retrying (9)...
holder-backend-1     | AggregateError [ECONNREFUSED]: 
holder-backend-1     |     at internalConnectMultiple (node:net:1117:18)
holder-backend-1     |     at afterConnectMultiple (node:net:1684:7)
holder-backend-1     | [Nest] 9  - 06/03/2024, 8:24:26 PM   ERROR [ExceptionHandler] 
holder-backend-1     | AggregateError [ECONNREFUSED]: 
holder-backend-1     |     at internalConnectMultiple (node:net:1117:18)
holder-backend-1     |     at afterConnectMultiple (node:net:1684:7)
holder-backend-1 exited with code 1
@cre8
Copy link
Contributor

cre8 commented Jun 5, 2024

Yeah, we need to update the description to make it more clear.

Speaking of deployment, do you think we need to provide other approaches that using docker compose to start it?

@cre8
Copy link
Contributor

cre8 commented Jun 8, 2024

@Echsecutor I was not able yet to provide a full local docker deployment. Main reason for this is the keycloak deployment:

The frontend will receive the jwk where the iss value is set to localhost:8080. When this value is send to the backend, the backend needs to get the public key. The docker containers are all deployed in the same network, so the endpoint to keycloak would be keycloak:8080. And now the validation in the oidc-client sdk will vail since to it the iss value does not match with the known realm url....

@cre8
Copy link
Contributor

cre8 commented Jun 10, 2024

@Echsecutor the deploys are now split up into separate files, allowing to start what you actually need, see https://github.com/openwallet-foundation-labs/credhub/tree/main/deploys

The keycloak problem was solved by using host.docker.internal which worked fine under Windows for the localhost alternative and according to the docs it should work for MacOS too. For Linux seems to exists a workaround, but I haven't tried it yet

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants