laconic-deployer-frontend/apps/deployer/README.md

2.3 KiB

deployer

The following steps are for deploying the frontend app to vaasl webapp deployer.

Run these steps in the apps/deployer/ directory:

  • Install dependencies

    pnpm install
    
    # if you do not have jq installed already
    brew install jq
    # OR
    sudo apt-get install jq
    
  • Copy and update .env

    cp .env.example .env
    

    Set the required variables:

    REGISTRY_BOND_ID=230cfedda15e78edc8986dfcb870e1b618f65c56e38d2735476d2a8cb3f25e38
    DEPLOYER_LRN=lrn://vaasl-provider/deployers/webapp-deployer-api.apps.vaasl.io
    AUTHORITY=laconic
    
  • Set the userKey in config.yml

    Note: The userKey should be the private key of the account owning the bond set in config.yml (account address: laconic13maulvmjxnyx3g855vk0lsv5aptf3rpxskynef)

  • Set the app env values in deploy-frontend.sh (Refer to main readme):

    NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY: your_clerk_key
    CLERK_SECRET_KEY: your_clerk_secret
    NEXT_PUBLIC_WALLET_IFRAME_URL: https://wallet.laconic.com
    NEXT_PUBLIC_LACONICD_CHAIN_ID: laconic-mainnet
    NEXT_PUBLIC_API_URL: https://deploy-backend.apps.vaasl.io
    NEXT_PUBLIC_GITHUB_FALLBACK_TOKEN: your_github_token
    

    NOTE: Replace your_clerk_key, your_clerk_secret and your_github_token with actual values

  • Run script to deploy app to deploy-staging.laconic.co

    ./deploy-frontend.sh
    
  • Commit the updated ApplicationRecord and ApplicationDeploymentRequest files to the repository

Troubleshoot

  • Check deployment status in web-app deployer.

  • Check records in registry console app.

  • If deployment fails due to low bond balance

    • Check balances

      # Account balance
      pnpm laconic registry account get
      
      # Bond balance
      pnpm laconic registry bond get --id 230cfedda15e78edc8986dfcb870e1b618f65c56e38d2735476d2a8cb3f25e38
      
    • Command to refill bond

      pnpm laconic registry bond refill --id 230cfedda15e78edc8986dfcb870e1b618f65c56e38d2735476d2a8cb3f25e38 --type alnt --quantity 10000000