testnet-onboarding-app-stack/stack-orchestrator/stacks/onboarding-app/README.md
Nabarun bed329409e Add staking amount config for creating validator (#6)
Part of [laconicd testnet validator enrollment](https://www.notion.so/laconicd-testnet-validator-enrollment-6fc1d3cafcc64fef8c5ed3affa27c675)

Reviewed-on: #6
Co-authored-by: Nabarun <nabarun@deepstacksoft.com>
Co-committed-by: Nabarun <nabarun@deepstacksoft.com>
2024-08-09 09:49:41 +00:00

100 lines
2.5 KiB
Markdown

# onboarding-app
Instructions for running the `testnet-onboarding-app` using [laconic-so](https://git.vdb.to/cerc-io/stack-orchestrator)
## Setup
* Clone the stack repo:
```bash
laconic-so fetch-stack git.vdb.to/cerc-io/testnet-onboarding-app-stack
```
* Setup required repositories:
```bash
laconic-so --stack ~/cerc/testnet-onboarding-app-stack/stack-orchestrator/stacks/onboarding-app setup-repositories
```
* Build the container image:
```bash
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:
```bash
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:
```bash
network:
ports:
testnet-onboarding-app:
- '3000:80'
```
* Create a deployment from the spec file:
```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
```
## Configuration
* Inside the `onboarding-app-deployment` deployment directory, open `config.env` file and set following env variables:
```bash
# 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: alnt)
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=
# Staking amount for validator creation (default: 1000000000000000)
CERC_STAKING_AMOUNT=
```
## Start the deployment
```bash
laconic-so deployment --dir onboarding-app-deployment start
```
Open the app in a browser at <http://localhost:3000>
## Clean up
* Stop the deployment:
```bash
laconic-so deployment --dir onboarding-app-deployment stop
```