Skip to content
This repository was archived by the owner on Jan 9, 2024. It is now read-only.

Commit ccf7423

Browse files
committed
Merge branch 'main' into tenant
# Conflicts: # src/main/resources/db/postgres/V1__create_tables_account_email_wallet_accountwallet_walletoperationhistories.sql # web/src/pages/wallet/[wallet]/settings/issuers/index.vue
2 parents 8c3fa2e + e57d0c5 commit ccf7423

18 files changed

+309
-94
lines changed

docker-compose/.env

+4-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
1-
WALLETKIT_PORT=7000
1+
WALLET_FRONTEND_PORT=3000
2+
WALLET_BACKEND_PORT=4545
3+
WEB_PORTAL_PORT=4000
4+
VC_REPO_PORT=5000
25
ISSUER_PORT=8000
36
VERIFIER_PORT=9000
4-
WALLET_BACKEND_PORT=4545
5-
WALLET_FRONTEND_PORT=3000
67
HOSTNAME=host.docker.internal

docker-compose/docker-compose.yaml

+32-20
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,8 @@
11
services:
2-
walletkit:
3-
image: waltid/walletkit:latest # backend docker image
4-
command:
5-
- run
6-
environment:
7-
WALTID_DATA_ROOT: /waltid-walletkit/data-root
8-
WALTID_WALLET_BACKEND_BIND_ADDRESS: 0.0.0.0
9-
WALTID_WALLET_BACKEND_PORT: "$WALLETKIT_PORT"
10-
EXTERNAL_HOSTNAME: $HOSTNAME
11-
volumes:
12-
- ./walletkit:/waltid-walletkit/data-root # data store volume incl. config files.
13-
extra_hosts:
14-
- "$HOSTNAME:host-gateway"
2+
# postgresdb: # Uncomment to connect a Postgres DB
3+
# image: postgres
4+
# environment:
5+
# POSTGRES_PASSWORD: secret
156
wallet-backend:
167
image: waltid/wallet-backend:latest
178
volumes:
@@ -20,24 +11,45 @@ services:
2011
wallet-frontend:
2112
image: waltid/wallet-frontend:latest
2213
environment:
23-
NUXT_PUBLIC_ISSUER_URL: "http://localhost:$ISSUER_PORT"
24-
issuer-portal:
25-
image: waltid/ssikit-issuer-portal:latest
26-
verifier-portal:
27-
image: waltid/ssikit-verifier-portal:latest
14+
NUXT_PUBLIC_ISSUER_CALLBACK_URL: "http://localhost:$WALLET_FRONTEND_PORT"
15+
issuer:
16+
image: waltid/issuer:latest
17+
volumes:
18+
- ./issuer/config:/waltid-issuer/config
19+
verifier:
20+
image: waltid/verifier:latest
21+
volumes:
22+
- ./verifier/config:/waltid-verifier/config
23+
web-portal:
24+
image: waltid/portal:latest
25+
environment:
26+
NEXT_PUBLIC_VC_REPO: "http://localhost:$VC_REPO_PORT"
27+
NEXT_PUBLIC_ISSUER: "http://localhost:$ISSUER_PORT"
28+
NEXT_PUBLIC_VERIFIER: "http://localhost:$VERIFIER_PORT"
29+
NEXT_PUBLIC_WALLET: "http://localhost:$WALLET_FRONTEND_PORT"
30+
vc-repo:
31+
image: waltid/vc-repository:latest
2832
ingress:
2933
image: nginx:1.15.10-alpine
3034
ports:
3135
- target: $WALLET_FRONTEND_PORT
3236
published: $WALLET_FRONTEND_PORT # wallet-frontend
3337
protocol: tcp
3438
mode: host
39+
- target: $WEB_PORTAL_PORT
40+
published: $WEB_PORTAL_PORT # web-portal
41+
protocol: tcp
42+
mode: host
43+
- target: $VC_REPO_PORT
44+
published: $VC_REPO_PORT # vc-repo
45+
protocol: tcp
46+
mode: host
3547
- target: $ISSUER_PORT
36-
published: $ISSUER_PORT # issuer-portal
48+
published: $ISSUER_PORT # issuer-api
3749
protocol: tcp
3850
mode: host
3951
- target: $VERIFIER_PORT
40-
published: $VERIFIER_PORT # verifier-portal
52+
published: $VERIFIER_PORT # verifier-api
4153
protocol: tcp
4254
mode: host
4355
volumes:

docker-compose/ingress.conf

+22-14
Original file line numberDiff line numberDiff line change
@@ -16,41 +16,49 @@ server {
1616
# wallet-backend
1717
server {
1818
listen 4545;
19-
location ~* /(api|webjars|verifier-api|issuer-api)/ {
20-
proxy_pass http://walletkit:7000;
19+
20+
location / {
21+
proxy_pass http://wallet-backend:4545;
2122
proxy_redirect default;
2223
}
24+
}
25+
26+
# web-portal
27+
server {
28+
listen 4000;
2329

2430
location / {
25-
proxy_pass http://wallet-backend;
31+
proxy_pass http://web-portal:3000;
2632
proxy_redirect default;
2733
}
2834
}
2935

30-
# issuer-portal
36+
# vc-repo
3137
server {
32-
listen 8000;
33-
location ~* /(api|webjars|verifier-api|issuer-api)/ {
34-
proxy_pass http://walletkit:7000;
38+
listen 5000;
39+
40+
location / {
41+
proxy_pass http://vc-repo:3000;
3542
proxy_redirect default;
3643
}
44+
}
45+
46+
# issuer
47+
server {
48+
listen 8000;
3749

3850
location / {
39-
proxy_pass http://issuer-portal;
51+
proxy_pass http://issuer:3000;
4052
proxy_redirect default;
4153
}
4254
}
4355

44-
# verifier-portal
56+
# verifier
4557
server {
4658
listen 9000;
47-
location ~* /(api|webjars|verifier-api|issuer-api)/ {
48-
proxy_pass http://walletkit:7000;
49-
proxy_redirect default;
50-
}
5159

5260
location / {
53-
proxy_pass http://verifier-portal;
61+
proxy_pass http://verifier:3000;
5462
proxy_redirect default;
5563
}
5664
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
baseUrl = "localhost:8000"

docker-compose/issuer/config/web.conf

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
webHost = "0.0.0.0"
2+
webPort = 3000

docker-compose/readme.md

+8-6
Original file line numberDiff line numberDiff line change
@@ -9,18 +9,20 @@ run a complete credential flow:
99
## Services
1010

1111
The complete list of services and their port mapping is following:
12-
- walletkit: `7000`
13-
- web-wallet-backend: `4545`
14-
- web-wallet-frontend: `3000` (published)
15-
- issuer-portal: `8000` (published)
16-
- verifier-portal: `9000` (published)
12+
- web-wallet-frontend: `3000`
13+
- web-wallet-backend: `4545` (not published)
14+
- web-portal: `4000`
15+
- vc-repo: `5000`
16+
- issuer: `8000`
17+
- verifier: `9000`
1718

1819
## Configurations
1920

2021
Config locations:
2122

2223
- web-wallet: `wallet-backend/config`
23-
- walletkit: `walletkit/config`
24+
- issuer: `issuer/config`
25+
- verifier: `verifier/config`
2426
- ingress: `ingress.conf`
2527
- environment: `.env`
2628

Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
baseUrl = "localhost:9000"
+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
webHost = "0.0.0.0"
2+
webPort = 3000
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
1+
# database = "db.postgres"
12
database = "db.sqlite"
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
hikariDataSource {
2+
jdbcUrl = "jdbc:postgresql://postgresdb:5432/postgres"
3+
driverClassName = "org.postgresql.Driver"
4+
username = "postgres"
5+
password = "secret"
6+
transactionIsolation = "TRANSACTION_SERIALIZABLE"
7+
maximumPoolSize = 5
8+
autoCommit = false
9+
dataSource {
10+
journalMode = WAL
11+
fullColumnNames = false
12+
}
13+
}

docker-compose/walletkit/config/issuer-config.json

-25
This file was deleted.

docker-compose/walletkit/config/verifier-config.json

-13
This file was deleted.

docker-compose/walletkit/config/wallet-config.json

-11
This file was deleted.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
-- ----------------------------------
2+
-- Emails table
3+
-- ----------------------------------
4+
CREATE TABLE IF NOT EXISTS "emails"
5+
(
6+
"id" UUID NOT NULL,
7+
"email" TEXT COLLATE pg_catalog."default" NOT NULL,
8+
"password" TEXT COLLATE pg_catalog."default" NOT NULL,
9+
CONSTRAINT "emails_pkey" PRIMARY KEY ("id"),
10+
CONSTRAINT "email" UNIQUE ("email")
11+
);
12+
-- ----------------------------------
13+
-- Wallets table
14+
-- ----------------------------------
15+
CREATE TABLE IF NOT EXISTS "wallets"
16+
(
17+
"id" UUID NOT NULL,
18+
"address" TEXT COLLATE pg_catalog."default" NOT NULL,
19+
"ecosystem" TEXT COLLATE pg_catalog."default" NOT NULL,
20+
CONSTRAINT "wallets_pkey" PRIMARY KEY ("id"),
21+
CONSTRAINT "address" UNIQUE ("address")
22+
);
23+
-- ----------------------------------
24+
-- Accounts table
25+
-- ----------------------------------
26+
CREATE TABLE IF NOT EXISTS "accounts"
27+
(
28+
"id" UUID NOT NULL,
29+
"email" UUID NULL,
30+
"wallet" UUID NULL,
31+
CONSTRAINT "accounts_pkey" PRIMARY KEY ("id"),
32+
CONSTRAINT "accounts_email_wallet_unique" UNIQUE ("email", "wallet")
33+
INCLUDE("email", "wallet"),
34+
CONSTRAINT "account_email_fk" FOREIGN KEY ("email")
35+
REFERENCES "emails" ("id") MATCH SIMPLE
36+
ON UPDATE CASCADE
37+
ON DELETE CASCADE,
38+
CONSTRAINT "account_wallet_fk" FOREIGN KEY ("wallet")
39+
REFERENCES "wallets" ("id") MATCH SIMPLE
40+
ON UPDATE CASCADE
41+
ON DELETE CASCADE
42+
);
43+
-- ----------------------------------
44+
-- AccountWallets table
45+
-- ----------------------------------
46+
CREATE TABLE IF NOT EXISTS "account_wallets"
47+
(
48+
"id" UUID NOT NULL,
49+
"account" UUID NOT NULL,
50+
"wallet" UUID NOT NULL,
51+
CONSTRAINT "account_wallets_pkey" PRIMARY KEY ("id"),
52+
CONSTRAINT "account_wallets_account_fk" FOREIGN KEY ("account")
53+
REFERENCES "accounts" ("id") MATCH SIMPLE
54+
ON UPDATE CASCADE
55+
ON DELETE CASCADE,
56+
CONSTRAINT "account_wallets_wallet_fk" FOREIGN KEY ("wallet")
57+
REFERENCES "wallets" ("id") MATCH SIMPLE
58+
ON UPDATE CASCADE
59+
ON DELETE CASCADE
60+
);
61+
-- ----------------------------------
62+
-- WalletOperationHistories table
63+
-- ----------------------------------
64+
CREATE TABLE IF NOT EXISTS "wallet_operation_histories"
65+
(
66+
"id" UUID NOT NULL,
67+
"account" UUID NOT NULL,
68+
"timestamp" TEXT COLLATE pg_catalog."default" NOT NULL,
69+
"operation" TEXT COLLATE pg_catalog."default" NOT NULL,
70+
"data" TEXT COLLATE pg_catalog."default" NOT NULL,
71+
CONSTRAINT "wallet_operation_histories_pkey" PRIMARY KEY ("id"),
72+
CONSTRAINT "wallet_operation_histories_account_fk" FOREIGN KEY ("account")
73+
REFERENCES "accounts" ("id") MATCH SIMPLE
74+
ON UPDATE CASCADE
75+
ON DELETE CASCADE
76+
);

0 commit comments

Comments
 (0)