Nabarun Gogoi
86f13e9c6b
* Separate out watcher and web-apps in mobymask stack
* Take L2 RPC endpoint from the env file
* Changes to run watcher and mobymask web-app separately
* Support running watcher without contract deployment and L2 txs
* Remove duplicate mobymask params env
* Add code comments
* Add instructions for running web-apps separately
* Self review fixes
* Fix timeout for mobymask-app on watcher server
---------
Co-authored-by: prathamesh0 <prathamesh.musale0@gmail.com>
Former-commit-id: 6f781ae303
2.3 KiB
2.3 KiB
Web Apps
Instructions to setup and deploy MobyMask and Peer Test web apps
Setup
Prerequisite: Watcher with GQL and relay node endpoints
Clone required repositories:
laconic-so --stack mobymask-v2 setup-repositories --include cerc-io/react-peer,cerc-io/mobymask-ui
Checkout to the required versions and branches in repos:
# react-peer
cd ~/cerc/react-peer
git checkout v0.2.31
# mobymask-ui
cd ~/cerc/mobymask-ui
git checkout laconic
Build the container images:
laconic-so --stack mobymask-v2 build-containers --include cerc/react-peer-v2,cerc/mobymask-ui
This should create the required docker images in the local image registry
Deploy
Configuration
- Update the mobymask-params.env file with watcher endpoints and other params required by the web-apps
WATCHER_HOST
andWATCHER_PORT
is used to check if watcher is up before building and deploying mobymask-appAPP_WATCHER_URL
is used by mobymask-app to make GQL queriesDEPLOYED_CONTRACT
andCHAIN_ID
is used by mobymask-app in app config when creating messgaes for L2 txsRELAY_NODES
is used by the web-apps to connect to the relay nodes (run in watcher)
- NOTE:
- Stack Orchestrator needs to be run in
dev
mode to be able to edit the env file - If watcher is running on the host machine, use
host.docker.internal
as the hostname to access the host port
- Stack Orchestrator needs to be run in
Deploy the stack
For running mobymask-app
laconic-so --stack mobymask-v2 deploy --include mobymask-app up
For running peer-test-app
laconic-so --stack mobymask-v2 deploy --include peer-test-app up
To list down and monitor the running containers:
docker ps
# Check logs for a container
docker logs -f <CONTAINER_ID>
Clean up
Stop all services running in the background:
For mobymask-app
laconic-so --stack mobymask-v2 deploy --include mobymask-app down
For peer-test-app
laconic-so --stack mobymask-v2 deploy --include peer-test-app down
Clear volumes created by this stack:
# List all relevant volumes
docker volume ls -q --filter "name=.*mobymask_deployment"
# Remove all the listed volumes
docker volume rm $(docker volume ls -q --filter "name=.*mobymask_deployment")