Update instructions

This commit is contained in:
Prathamesh Musale 2023-04-10 20:10:36 +05:30
parent 365f295b1e
commit e894901b02
3 changed files with 67 additions and 20 deletions

View File

@ -35,7 +35,22 @@ This should create the required docker images in the local image registry:
## Deploy
Create an env file to be used in the next step with contents from [l1-params.env](../../config/fixturenet-optimism/l1-params.env); update it with L1 endpoint (`L1_RPC`, `L1_HOST` and `L1_PORT`) and other params
Create and update an env file to be used in the next step:
```bash
# External L1 endpoint
L1_CHAIN_ID=
L1_RPC=
L1_HOST=
L1_PORT=
# Credentials for accounts on L1 to send balance to Optimism Proxy contract from
# (enables them to do transactions on L2)
L1_ADDRESS=
L1_PRIV_KEY=
L1_ADDRESS_2=
L1_PRIV_KEY_2=
```
* NOTE: If L1 is running on the host machine, use `host.docker.internal` as the hostname to access the host port

View File

@ -36,19 +36,38 @@ This should create the required docker images in the local image registry
### Configuration
* In [mobymask-params.env](../../config/watcher-mobymask-v2/mobymask-params.env) file set `DEPLOYED_CONTRACT` to existing deployed mobymask contract address
* Setting `DEPLOYED_CONTRACT` will skip contract deployment when running stack
* `ENABLE_PEER_L2_TXS` is used to enable/disable sending txs to L2 chain from watcher peer.
* Update the [optimism-params.env](../../config/watcher-mobymask-v2/optimism-params.env) file with Optimism endpoints and other params for the Optimism running separately
* `PRIVATE_KEY_PEER` is used by watcher peer to send txs to L2 chain
* NOTE:
* Stack Orchestrator needs to be run in [`dev`](/docs/CONTRIBUTING.md#install-developer-mode) mode to be able to edit the env file
* If Optimism is running on the host machine, use `host.docker.internal` as the hostname to access the host port
Create an env file to be used in the next step:
```bash
# External L2 endpoints
L2_GETH_RPC=
L2_GETH_HOST=
L2_GETH_PORT=
L2_NODE_HOST=
L2_NODE_PORT=
# Credentials for accounts to perform txs on L2
PRIVATE_KEY_DEPLOYER=
PRIVATE_KEY_PEER=
# Base URI for mobymask-app (used for generating invite)
MOBYMASK_APP_BASE_URI="http://127.0.0.1:3002/#"
# Set to false for disabling watcher peer to send txs to L2
ENABLE_PEER_L2_TXS=true
# Set deployed MobyMask contract address to avoid deploying contract in the stack
# mobymask-app will use this contract address in config if run separately
DEPLOYED_CONTRACT=
```
* NOTE: If Optimism is running on the host machine, use `host.docker.internal` as the hostname to access the host port
### Deploy the stack
```bash
laconic-so --stack mobymask-v2 deploy --include watcher-mobymask-v2 up
laconic-so --stack mobymask-v2 deploy --include watcher-mobymask-v2 --env-file <PATH_TO_ENV_FILE> up
```
To list down and monitor the running containers:

View File

@ -36,25 +36,38 @@ This should create the required docker images in the local image registry
### Configuration
* Update the [mobymask-params.env](../../config/watcher-mobymask-v2/mobymask-params.env) file with watcher endpoints and other params required by the web-apps
* `WATCHER_HOST` and `WATCHER_PORT` is used to check if watcher is up before building and deploying mobymask-app
* `APP_WATCHER_URL` is used by mobymask-app to make GQL queries
* `DEPLOYED_CONTRACT` and `CHAIN_ID` is used by mobymask-app in app config when creating messgaes for L2 txs
* `RELAY_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`](/docs/CONTRIBUTING.md#install-developer-mode) 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
Create an env file to be used in the next step:
```bash
# Set relay nodes to be used by the web-app
RELAY_NODES=["/ip4/127.0.0.1/tcp/9090/ws/p2p/12D3KooWSPCsVkHVyLQoCqhu2YRPvvM7o6r6NRYyLM5zeA6Uig5t"]
# Also add if running MobyMask app:
# External watcher endpoint
WATCHER_HOST=
WATCHER_PORT=
APP_WATCHER_URL=
# Set deployed MobyMask contract address to be used in MobyMask app's config
DEPLOYED_CONTRACT=
# L2 Chain ID used by mobymask web-app for L2 txs
CHAIN_ID=42069
```
* NOTE: If watcher is running on the host machine, use `host.docker.internal` as the hostname to access the host port
### Deploy the stack
For running mobymask-app
```bash
laconic-so --stack mobymask-v2 deploy --include mobymask-app up
laconic-so --stack mobymask-v2 deploy --include mobymask-app --env-file <PATH_TO_ENV_FILE> up
```
For running peer-test-app
```bash
laconic-so --stack mobymask-v2 deploy --include peer-test-app up
laconic-so --stack mobymask-v2 deploy --include peer-test-app --env-file <PATH_TO_ENV_FILE> up
```
To list down and monitor the running containers: