83 lines
2.3 KiB
Markdown
83 lines
2.3 KiB
Markdown
# deployer
|
|
|
|
The following steps are for deploying the frontend app to vaasl webapp deployer.
|
|
|
|
Run these steps in the `apps/deployer/` directory:
|
|
|
|
- Install dependencies
|
|
|
|
```bash
|
|
pnpm install
|
|
```
|
|
|
|
```bash
|
|
# 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](./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](./deploy-frontend.sh) (Refer to main [readme](/readme.md#3-configure-environment-variables)):
|
|
<!-- TODO: Set env values from a file -->
|
|
|
|
```sh
|
|
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`
|
|
|
|
```bash
|
|
./deploy-frontend.sh
|
|
```
|
|
|
|
- Commit the updated [ApplicationRecord](records/application-record.yml) and [ApplicationDeploymentRequest](records/application-deployment-request.yml) files to the repository
|
|
|
|
## Troubleshoot
|
|
|
|
- Check deployment status in [web-app deployer](https://console.laconic.com/deployer).
|
|
|
|
- Check records in [registry console app](https://console.laconic.com/#/registry).
|
|
|
|
- If deployment fails due to low bond balance
|
|
|
|
- Check balances
|
|
|
|
```bash
|
|
# Account balance
|
|
pnpm laconic registry account get
|
|
|
|
# Bond balance
|
|
pnpm laconic registry bond get --id 230cfedda15e78edc8986dfcb870e1b618f65c56e38d2735476d2a8cb3f25e38
|
|
```
|
|
|
|
- Command to refill bond
|
|
|
|
```bash
|
|
pnpm laconic registry bond refill --id 230cfedda15e78edc8986dfcb870e1b618f65c56e38d2735476d2a8cb3f25e38 --type alnt --quantity 10000000
|
|
```
|