Update testnet onboarding demo with new stacks #15

Merged
nabarun merged 12 commits from pm-update-demo-kyc into main 2024-08-05 15:45:57 +00:00
Showing only changes of commit 76b98af374 - Show all commits

View File

@ -107,43 +107,89 @@
WALLET_CONNECT_ID=39bc93c...
```
### Testnet Onboarding App
### Testnet Onboarding App and Onboarding API stacks
- Clone the repository
- Clone the stack repo:
```bash
git clone git@git.vdb.to:cerc-io/testnet-onboarding-app.git
laconic-so fetch-stack git.vdb.to/cerc-io/testnet-onboarding-app-stack
```
- Enter the project directory
- Setup required repositories:
```bash
cd testnet-onboarding-app
laconic-so --stack ~/cerc/testnet-onboarding-app-stack/stack-orchestrator/stacks/onboarding-app setup-repositories --pull
laconic-so --stack ~/cerc/testnet-onboarding-app-stack/stack-orchestrator/stacks/onboarding-api setup-repositories --pull
```
- Setup .env
- Copy and update `.env`
- Build the container image:
```bash
cp .env.example .env
laconic-so --stack ~/cerc/testnet-onboarding-app-stack/stack-orchestrator/stacks/onboarding-app build-containers --force-rebuild
laconic-so --stack ~/cerc/testnet-onboarding-app-stack/stack-orchestrator/stacks/onboarding-api build-containers --force-rebuild
```
- In the `.env` file, add the WalletConnect project ID used in your [laconic-wallet](https://git.vdb.to/cerc-io/laconic-wallet) setup.
- Create spec files for deployments, which will map the stack's ports to the host:
```bash
WALLET_CONNECT_PROJECT_ID=39bc93c...
laconic-so --stack ~/cerc/testnet-onboarding-app-stack/stack-orchestrator/stacks/onboarding-app deploy init --output onboarding-app-spec.yml
laconic-so --stack ~/cerc/testnet-onboarding-app-stack/stack-orchestrator/stacks/onboarding-api deploy init --output onboarding-api-spec.yml
```
- Install dependencies
- Configure ports:
- `onboarding-app-spec.yml`:
```bash
yarn
network:
ports:
testnet-onboarding-app:
- '3000:80'
```
- Exit project repo
- `onboarding-api-spec.yml`:
```bash
cd ../
network:
ports:
testnet-onboarding-api:
- '3001:3000'
```
- Create deployments:
```bash
laconic-so --stack ~/cerc/testnet-onboarding-app-stack/stack-orchestrator/stacks/onboarding-app deploy create --spec-file onboarding-app-spec.yml --deployment-dir onboarding-app-deployment
laconic-so --stack ~/cerc/testnet-onboarding-app-stack/stack-orchestrator/stacks/onboarding-api deploy create --spec-file onboarding-api-spec.yml --deployment-dir onboarding-api-deployment
```
- Env configuration:
- Set the required variables:
```bash
# WalletConnect project ID
export WALLET_CONNECT_ID=
# Your sumsub application token
export SUMSUB_APP_TOKEN=
# Your sumsub secret key
export SUMSUB_SECRET_KEY=
```
- Set the env config for app and apk deployments:
```bash
cat <<EOF > onboarding-app-deployment/config.env
WALLET_CONNECT_ID=$WALLET_CONNECT_ID
EOF
cat <<EOF > onboarding-api-deployment/config.env
SUMSUB_APP_TOKEN=$SUMSUB_APP_TOKEN
SUMSUB_SECRET_KEY=$SUMSUB_SECRET_KEY
EOF
```
### Stack Orchestrator