testnet-onboarding-app-stack/stack-orchestrator/stacks/onboarding-app
Nabarun 4ffbf87ec5 Add onboarding API endpoint in app stack for sumsub token (#2)
Part of [Sumsub KYC integration in onboarding app](https://www.notion.so/Sumsub-KYC-integration-in-onboarding-app-607b598c9c1d4d12adc71725e2ab5e7e)

Reviewed-on: #2
Co-authored-by: Nabarun <nabarun@deepstacksoft.com>
Co-committed-by: Nabarun <nabarun@deepstacksoft.com>
2024-07-27 15:32:03 +00:00
..
README.md Add onboarding API endpoint in app stack for sumsub token (#2) 2024-07-27 15:32:03 +00:00
stack.yml Add stacks for testnet-onboarding-app and testnet-onboarding-api (#1) 2024-07-26 06:31:40 +00:00

onboarding-app

Instructions for running the testnet-onboarding-app using laconic-so

Setup

  • Clone the stack repo:

    laconic-so fetch-stack git.vdb.to/cerc-io/testnet-onboarding-app-stack
    
  • Setup required repositories:

    laconic-so --stack ~/cerc/testnet-onboarding-app-stack/stack-orchestrator/stacks/onboarding-app setup-repositories
    
  • Build the container image:

    laconic-so --stack ~/cerc/testnet-onboarding-app-stack/stack-orchestrator/stacks/onboarding-app build-containers
    

    This should create the cerc/testnet-onboarding-app image locally

Create a deployment

  • Create a spec file for the deployment:

    laconic-so --stack ~/cerc/testnet-onboarding-app-stack/stack-orchestrator/stacks/onboarding-app deploy init --output onboarding-app-spec.yml
    
  • Edit network in the spec file to map container ports to host ports as required:

    network:
      ports:
        testnet-onboarding-app:
          - '3000:80'
    
  • Create a deployment from the spec file:

    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
    

Configuration

  • Inside the onboarding-app-deployment deployment directory, open config.env file and set following env variables:

    # WalletConnect project ID, same should be used in the laconic-wallet
    WALLET_CONNECT_ID=
    
    # Optional
    
    # laconicd chain id (default: laconic_9000-1)
    CERC_LACONICD_CHAIN_ID=
    
    # laconicd registry GQL endpoint (default: http://localhost:9473/api)
    CERC_REGISTRY_GQL_ENDPOINT=
    
    # laconicd RPC endpoint (default: http://laconicd:26657)
    CERC_LACONICD_RPC_ENDPOINT=
    
    # laconicd token denom (default: photon)
    CERC_LACONICD_DENOM=
    
    # Faucet RPC endpoint (default: http://localhost:4000)
    CERC_FAUCET_ENDPOINT=
    
    # laconic wallet meta URL (default: http://localhost:3000)
    CERC_WALLET_META_URL=
    
    # Onboarding API endpoint (default: http://localhost:3001)
    CERC_SUMSUB_API_ENDPOINT=
    

Start the deployment

laconic-so deployment --dir onboarding-app-deployment start

Open the app in a browser at http://localhost:3000

Clean up

  • Stop the deployment:

    laconic-so deployment --dir onboarding-app-deployment stop