diff --git a/docker-compose/.env b/docker-compose/.env index 9780d46..1be4d51 100644 --- a/docker-compose/.env +++ b/docker-compose/.env @@ -1,6 +1,7 @@ -WALLETKIT_PORT=7000 +WALLET_FRONTEND_PORT=3000 +WALLET_BACKEND_PORT=4545 +WEB_PORTAL_PORT=4000 +VC_REPO_PORT=5000 ISSUER_PORT=8000 VERIFIER_PORT=9000 -WALLET_BACKEND_PORT=4545 -WALLET_FRONTEND_PORT=3000 HOSTNAME=host.docker.internal \ No newline at end of file diff --git a/docker-compose/docker-compose.yaml b/docker-compose/docker-compose.yaml index c0ad7cb..ae02e4b 100644 --- a/docker-compose/docker-compose.yaml +++ b/docker-compose/docker-compose.yaml @@ -1,17 +1,4 @@ services: - walletkit: - image: waltid/walletkit:latest # backend docker image - command: - - run - environment: - WALTID_DATA_ROOT: /waltid-walletkit/data-root - WALTID_WALLET_BACKEND_BIND_ADDRESS: 0.0.0.0 - WALTID_WALLET_BACKEND_PORT: "$WALLETKIT_PORT" - EXTERNAL_HOSTNAME: $HOSTNAME - volumes: - - ./walletkit:/waltid-walletkit/data-root # data store volume incl. config files. - extra_hosts: - - "$HOSTNAME:host-gateway" wallet-backend: image: waltid/wallet-backend:latest volumes: @@ -20,11 +7,24 @@ services: wallet-frontend: image: waltid/wallet-frontend:latest environment: - NUXT_PUBLIC_ISSUER_URL: "http://localhost:$ISSUER_PORT" - issuer-portal: - image: waltid/ssikit-issuer-portal:latest - verifier-portal: - image: waltid/ssikit-verifier-portal:latest + NUXT_PUBLIC_ISSUER_CALLBACK_URL: "http://localhost:$WALLET_FRONTEND_PORT" + issuer: + image: waltid/issuer:latest + volumes: + - ./issuer/config:/waltid-issuer/config + verifier: + image: waltid/verifier:latest + volumes: + - ./verifier/config:/waltid-verifier/config + web-portal: + image: waltid/portal:latest + environment: + NEXT_PUBLIC_VC_REPO: "http://localhost:$VC_REPO_PORT" + NEXT_PUBLIC_ISSUER: "http://localhost:$ISSUER_PORT" + NEXT_PUBLIC_VERIFIER: "http://localhost:$VERIFIER_PORT" + NEXT_PUBLIC_WALLET: "http://localhost:$WALLET_FRONTEND_PORT" + vc-repo: + image: waltid/vc-repository:latest ingress: image: nginx:1.15.10-alpine ports: @@ -32,12 +32,20 @@ services: published: $WALLET_FRONTEND_PORT # wallet-frontend protocol: tcp mode: host + - target: $WEB_PORTAL_PORT + published: $WEB_PORTAL_PORT # web-portal + protocol: tcp + mode: host + - target: $VC_REPO_PORT + published: $VC_REPO_PORT # vc-repo + protocol: tcp + mode: host - target: $ISSUER_PORT - published: $ISSUER_PORT # issuer-portal + published: $ISSUER_PORT # issuer-api protocol: tcp mode: host - target: $VERIFIER_PORT - published: $VERIFIER_PORT # verifier-portal + published: $VERIFIER_PORT # verifier-api protocol: tcp mode: host volumes: diff --git a/docker-compose/ingress.conf b/docker-compose/ingress.conf index dea3287..5068ae0 100644 --- a/docker-compose/ingress.conf +++ b/docker-compose/ingress.conf @@ -16,41 +16,49 @@ server { # wallet-backend server { listen 4545; - location ~* /(api|webjars|verifier-api|issuer-api)/ { - proxy_pass http://walletkit:7000; + + location / { + proxy_pass http://wallet-backend:4545; proxy_redirect default; } +} + +# web-portal +server { + listen 4000; location / { - proxy_pass http://wallet-backend; + proxy_pass http://web-portal:3000; proxy_redirect default; } } -# issuer-portal +# vc-repo server { - listen 8000; - location ~* /(api|webjars|verifier-api|issuer-api)/ { - proxy_pass http://walletkit:7000; + listen 5000; + + location / { + proxy_pass http://vc-repo:3000; proxy_redirect default; } +} + +# issuer +server { + listen 8000; location / { - proxy_pass http://issuer-portal; + proxy_pass http://issuer:3000; proxy_redirect default; } } -# verifier-portal +# verifier server { listen 9000; - location ~* /(api|webjars|verifier-api|issuer-api)/ { - proxy_pass http://walletkit:7000; - proxy_redirect default; - } location / { - proxy_pass http://verifier-portal; + proxy_pass http://verifier:3000; proxy_redirect default; } } \ No newline at end of file diff --git a/docker-compose/issuer/config/issuer-service.conf b/docker-compose/issuer/config/issuer-service.conf new file mode 100644 index 0000000..b9ebd65 --- /dev/null +++ b/docker-compose/issuer/config/issuer-service.conf @@ -0,0 +1 @@ +baseUrl = "localhost:8000" \ No newline at end of file diff --git a/docker-compose/issuer/config/web.conf b/docker-compose/issuer/config/web.conf new file mode 100644 index 0000000..57b2f0a --- /dev/null +++ b/docker-compose/issuer/config/web.conf @@ -0,0 +1,2 @@ +webHost = "0.0.0.0" +webPort = 3000 \ No newline at end of file diff --git a/docker-compose/readme.md b/docker-compose/readme.md index 84aa004..1c3f242 100644 --- a/docker-compose/readme.md +++ b/docker-compose/readme.md @@ -9,18 +9,20 @@ run a complete credential flow: ## Services The complete list of services and their port mapping is following: -- walletkit: `7000` -- web-wallet-backend: `4545` -- web-wallet-frontend: `3000` (published) -- issuer-portal: `8000` (published) -- verifier-portal: `9000` (published) +- web-wallet-frontend: `3000` +- web-wallet-backend: `4545` (not published) +- web-portal: `4000` +- vc-repo: `5000` +- issuer: `8000` +- verifier: `9000` ## Configurations Config locations: - web-wallet: `wallet-backend/config` -- walletkit: `walletkit/config` +- issuer: `issuer/config` +- verifier: `verifier/config` - ingress: `ingress.conf` - environment: `.env` diff --git a/docker-compose/verifier/config/verifier-service.conf b/docker-compose/verifier/config/verifier-service.conf new file mode 100644 index 0000000..deda911 --- /dev/null +++ b/docker-compose/verifier/config/verifier-service.conf @@ -0,0 +1 @@ +baseUrl = "localhost:9000" \ No newline at end of file diff --git a/docker-compose/verifier/config/web.conf b/docker-compose/verifier/config/web.conf new file mode 100644 index 0000000..57b2f0a --- /dev/null +++ b/docker-compose/verifier/config/web.conf @@ -0,0 +1,2 @@ +webHost = "0.0.0.0" +webPort = 3000 \ No newline at end of file diff --git a/docker-compose/walletkit/config/issuer-config.json b/docker-compose/walletkit/config/issuer-config.json deleted file mode 100644 index 9468560..0000000 --- a/docker-compose/walletkit/config/issuer-config.json +++ /dev/null @@ -1,25 +0,0 @@ -{ - "credentialTypes": [ - "VerifiableId", - "VerifiableDiploma", - "ParticipantCredential", - "OpenBadgeCredential", - "Europass", - "GaiaxCredential", - "ProofOfResidence", - "VerifiableVaccinationCertificate", - "VerifiableAttestation" - ], - "issuerUiUrl": "http://$EXTERNAL_HOSTNAME:8000", - "issuerApiUrl": "http://$EXTERNAL_HOSTNAME:8000/issuer-api/default", - "issuerClientName": "walt.id Issuer Portal", - "wallets": { - "walt.id": { - "id": "walt.id", - "url": "http://$EXTERNAL_HOSTNAME:3000", - "presentPath": "api/siop/initiatePresentation/", - "receivePath" : "api/siop/initiateIssuance/", - "description": "walt.id web wallet" - } - } -} \ No newline at end of file diff --git a/docker-compose/walletkit/config/verifier-config.json b/docker-compose/walletkit/config/verifier-config.json deleted file mode 100644 index e7c8a89..0000000 --- a/docker-compose/walletkit/config/verifier-config.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "verifierUiUrl": "http://$EXTERNAL_HOSTNAME:9000", - "verifierApiUrl": "http://$EXTERNAL_HOSTNAME:9000/verifier-api/default", - "wallets": { - "walt.id": { - "id": "walt.id", - "url": "http://$EXTERNAL_HOSTNAME:3000", - "presentPath": "api/siop/initiatePresentation/", - "receivePath" : "api/siop/initiateIssuance/", - "description": "walt.id web wallet" - } - } -} \ No newline at end of file diff --git a/docker-compose/walletkit/config/wallet-config.json b/docker-compose/walletkit/config/wallet-config.json deleted file mode 100644 index 2f5cc71..0000000 --- a/docker-compose/walletkit/config/wallet-config.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "walletUiUrl": "http://$EXTERNAL_HOSTNAME:3000", - "walletApiUrl": "http://$EXTERNAL_HOSTNAME:3000/api", - "issuers": { - "walt.id": { - "id": "walt.id", - "url": "http://$EXTERNAL_HOSTNAME:8000/issuer-api/default/oidc", - "description": "walt.id Issuer Portal" - } - } -} \ No newline at end of file