Skip to content

Commit

Permalink
Merge branch 'main' of github.com:cre8/wallet
Browse files Browse the repository at this point in the history
Signed-off-by: Mirko Mollik <mirko.mollik@fit.fraunhofer.de>
  • Loading branch information
cre8 committed Apr 24, 2024
2 parents 57576e4 + bd14776 commit a4ad903
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 17 deletions.
16 changes: 9 additions & 7 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -8,20 +8,22 @@ KEYCLOAK_HOSTNAME_URL=http://localhost:8080
KC_POSTGRES_HOST=postgres
KC_POSTGRES_DB=keycloak
KC_POSTGRES_USER=keycloak
KC_POSTGRES_PASSWORD=password
KC_POSTGRES_PASSWORD=admin_password_keycloak_postgres

# Backend
## Keycloak config
KEYCLOAK_AUTH_URL=http://localhost:8080
#KEYCLOAK_AUTH_URL=http://localhost:8080
KEYCLOAK_AUTH_URL=http://keycloak:8080
KEYCLOAK_REALM=wallet
KEYCLOAK_CLIENT_ID=browser

## DB config
DB_HOST=localhost
# DB config
## use the docker compose service name as the host name
DB_HOST=db
DB_PORT=5432
DB_NAME=nestjs
DB_USERNAME=user
DB_PASSWORD=strongpw
DB_NAME=postgres
DB_USERNAME=postgres
DB_PASSWORD=admin_password_postgres

#issuer
ISSUER_BASE_URL=http://localhost:3001
Expand Down
14 changes: 11 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,18 @@ Instead of building a framework for wallets in one programming language, this re


# Setup
To install all dependencies for all apps, run `pnpm install` in the root folder.

Copy the `.env.example` file to `.env` and modify the values to your needs.
Dependencies like keycloak and the persistent storage of the backend can be started with `docker compose up -d`.
## Running

- Copy the `.env.example` file to `.env` and optionally modify the values.
- Run `docker compose up` to start a database and the issuer/holder/verifier/backend services as well as a keycloak instance.
- If you have already have a keycloak instance, set `KEYCLOAK_AUTH_URL` accordingly and run
`docker compose up --scale postgres-keycloak=0 --scale keycloak=0`.


## Development

To install all dependencies needed to run the apps locally, install [pnpm](https://pnpm.io/) and run `pnpm install` in the root folder.

# Apps

Expand Down
14 changes: 7 additions & 7 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ services:
image: 'postgres:14.4'
healthcheck:
test:
['CMD', 'pg_isready', '-q', '-d', 'postgres', '-U', $KC_POSTGRES_USER]
['CMD', 'pg_isready', '-q', '-d', 'postgres', '-U', '$KC_POSTGRES_USER']
timeout: 45s
interval: 10s
retries: 10
Expand Down Expand Up @@ -44,16 +44,14 @@ services:
KC_HOSTNAME_URL: $KEYCLOAK_HOSTNAME_URL
KEYCLOAK_ADMIN: $KEYCLOAK_ADMIN
KEYCLOAK_ADMIN_PASSWORD: $KEYCLOAK_ADMIN_PASSWORD
# volumes:
# - ./keywind/theme:/opt/keycloak/themes
ports:
- '8080:8080'

db:
image: 'postgres:14.4'
restart: unless-stopped
healthcheck:
test: ['CMD', 'pg_isready', '-q', '-d', 'postgres', '-U', $DB_USERNAME]
test: ['CMD', 'pg_isready', '-q', '-d', 'postgres', '-U', '$DB_USERNAME']
timeout: 45s
interval: 10s
retries: 10
Expand All @@ -76,6 +74,8 @@ services:
- PROJECT=issuer
env_file:
- .env
volumes:
- issuer_tmp:/app/tmp
ports:
- '3001:3000'

Expand All @@ -87,7 +87,7 @@ services:
args:
- PROJECT=verifier
volumes:
- verifier:/app/tmp
- verifier_tmp:/app/tmp
env_file:
- .env
ports:
Expand Down Expand Up @@ -122,5 +122,5 @@ services:
volumes:
keycloak-db:
nestjs-db:
issuer:
verifier:
issuer_tmp:
verifier_tmp:

0 comments on commit a4ad903

Please sign in to comment.