From 8b11070870e0e9ad34c736aa16b5de289b464c24 Mon Sep 17 00:00:00 2001 From: prathamesh0 <42446521+prathamesh0@users.noreply.github.com> Date: Wed, 12 Apr 2023 18:17:13 +0530 Subject: [PATCH] Configuration fixes for mobymask-v2 stack for multiple deployments (#318) * Fix contract deployment script in fixturenet-optimism stack * Configure relay node's announce domain from env * Configure relay peers list for the relay node from env * Create and use peer ids from a mounted volume * Fix command to create watcher config * Fix mobymask-app deployment script Former-commit-id: 882f0b16aacd847570de9e6a506cdf74ef6e6f14 --- .gitignore | 2 +- .../compose/docker-compose-mobymask-app.yml | 2 ++ .../compose/docker-compose-peer-test-app.yml | 4 +++ .../docker-compose-watcher-mobymask-v2.yml | 7 ++-- .../optimism-contracts/run.sh | 2 +- .../mobymask-app-config.json | 4 +-- .../watcher-mobymask-v2/mobymask-app-start.sh | 32 ++++++++++++------- .../watcher-mobymask-v2/mobymask-params.env | 10 ++++-- .../config/watcher-mobymask-v2/peer-id.json | 5 --- app/data/config/watcher-mobymask-v2/peer.env | 1 - .../config/watcher-mobymask-v2/relay-id.json | 5 --- .../watcher-mobymask-v2/start-server.sh | 32 +++++++++++++++++-- .../watcher-mobymask-v2/test-app-config.json | 4 +-- .../watcher-mobymask-v2/test-app-start.sh | 10 +++++- .../watcher-config-template.toml | 9 +++--- app/data/stacks/mobymask-v2/README.md | 4 +-- app/data/stacks/mobymask-v2/mobymask-only.md | 10 ++++-- app/data/stacks/mobymask-v2/web-apps.md | 10 +++--- 18 files changed, 103 insertions(+), 50 deletions(-) delete mode 100644 app/data/config/watcher-mobymask-v2/peer-id.json delete mode 100644 app/data/config/watcher-mobymask-v2/peer.env delete mode 100644 app/data/config/watcher-mobymask-v2/relay-id.json diff --git a/.gitignore b/.gitignore index a1dcd886..4b30a1d3 100644 --- a/.gitignore +++ b/.gitignore @@ -5,4 +5,4 @@ laconic-so laconic_stack_orchestrator.egg-info __pycache__ *~ - +build diff --git a/app/data/compose/docker-compose-mobymask-app.yml b/app/data/compose/docker-compose-mobymask-app.yml index 1cd4f9ab..df14d7db 100644 --- a/app/data/compose/docker-compose-mobymask-app.yml +++ b/app/data/compose/docker-compose-mobymask-app.yml @@ -22,6 +22,7 @@ services: - ../config/wait-for-it.sh:/app/wait-for-it.sh - ../config/watcher-mobymask-v2/mobymask-app-config.json:/app/src/mobymask-app-config.json - ../config/watcher-mobymask-v2/mobymask-app-start.sh:/app/mobymask-app-start.sh + - peers_ids:/peers - mobymask_deployment:/server ports: - "0.0.0.0:3002:3000" @@ -37,3 +38,4 @@ services: volumes: mobymask_deployment: + peers_ids: diff --git a/app/data/compose/docker-compose-peer-test-app.yml b/app/data/compose/docker-compose-peer-test-app.yml index c0cc68cb..7d1b89d6 100644 --- a/app/data/compose/docker-compose-peer-test-app.yml +++ b/app/data/compose/docker-compose-peer-test-app.yml @@ -14,6 +14,7 @@ services: volumes: - ../config/watcher-mobymask-v2/test-app-config.json:/app/packages/test-app/src/test-app-config.json - ../config/watcher-mobymask-v2/test-app-start.sh:/app/packages/test-app/test-app-start.sh + - peers_ids:/peers ports: - "0.0.0.0:3003:3000" healthcheck: @@ -24,3 +25,6 @@ services: start_period: 10s extra_hosts: - "host.docker.internal:host-gateway" + +volumes: + peers_ids: diff --git a/app/data/compose/docker-compose-watcher-mobymask-v2.yml b/app/data/compose/docker-compose-watcher-mobymask-v2.yml index 3af4eccb..601d13b6 100644 --- a/app/data/compose/docker-compose-watcher-mobymask-v2.yml +++ b/app/data/compose/docker-compose-watcher-mobymask-v2.yml @@ -70,15 +70,15 @@ services: CERC_SCRIPT_DEBUG: ${CERC_SCRIPT_DEBUG} CERC_L2_GETH_RPC: ${CERC_L2_GETH_RPC} CERC_PRIVATE_KEY_PEER: ${CERC_PRIVATE_KEY_PEER} + CERC_RELAY_PEERS: ${CERC_RELAY_PEERS} + CERC_RELAY_ANNOUNCE_DOMAIN: ${CERC_RELAY_ANNOUNCE_DOMAIN} CERC_ENABLE_PEER_L2_TXS: ${CERC_ENABLE_PEER_L2_TXS} CERC_DEPLOYED_CONTRACT: ${CERC_DEPLOYED_CONTRACT} command: ["sh", "start-server.sh"] volumes: - ../config/watcher-mobymask-v2/watcher-config-template.toml:/app/packages/mobymask-v2-watcher/environments/watcher-config-template.toml - - ../config/watcher-mobymask-v2/peer.env:/app/packages/peer/.env - - ../config/watcher-mobymask-v2/relay-id.json:/app/packages/mobymask-v2-watcher/relay-id.json - - ../config/watcher-mobymask-v2/peer-id.json:/app/packages/mobymask-v2-watcher/peer-id.json - ../config/watcher-mobymask-v2/start-server.sh:/app/packages/mobymask-v2-watcher/start-server.sh + - peers_ids:/app/packages/mobymask-v2-watcher/peers - mobymask_deployment:/server - fixturenet_geth_accounts:/geth-accounts:ro # Expose GQL, metrics and relay node ports @@ -97,5 +97,6 @@ services: volumes: mobymask_watcher_db_data: + peers_ids: mobymask_deployment: fixturenet_geth_accounts: diff --git a/app/data/config/fixturenet-optimism/optimism-contracts/run.sh b/app/data/config/fixturenet-optimism/optimism-contracts/run.sh index c8d1911f..a256ea64 100755 --- a/app/data/config/fixturenet-optimism/optimism-contracts/run.sh +++ b/app/data/config/fixturenet-optimism/optimism-contracts/run.sh @@ -101,7 +101,7 @@ node update-config.js deploy-config/getting-started.json "$ADMIN_ADDRESS" "$PROP echo "Updated the deployment config" # Create a .env file -echo "CERC_L1_RPC=$CERC_L1_RPC" > .env +echo "L1_RPC=$CERC_L1_RPC" > .env echo "PRIVATE_KEY_DEPLOYER=$ADMIN_PRIV_KEY" >> .env echo "Deploying the L1 smart contracts, this will take a while..." diff --git a/app/data/config/watcher-mobymask-v2/mobymask-app-config.json b/app/data/config/watcher-mobymask-v2/mobymask-app-config.json index 2ccb816d..ed913b51 100644 --- a/app/data/config/watcher-mobymask-v2/mobymask-app-config.json +++ b/app/data/config/watcher-mobymask-v2/mobymask-app-config.json @@ -1,8 +1,6 @@ { "name": "MobyMask", - "relayNodes": [ - "/ip4/127.0.0.1/tcp/9090/ws/p2p/12D3KooWSPCsVkHVyLQoCqhu2YRPvvM7o6r6NRYyLM5zeA6Uig5t" - ], + "relayNodes": [], "peer": { "enableDebugInfo": true } diff --git a/app/data/config/watcher-mobymask-v2/mobymask-app-start.sh b/app/data/config/watcher-mobymask-v2/mobymask-app-start.sh index fbe2fbf9..c494ed5c 100755 --- a/app/data/config/watcher-mobymask-v2/mobymask-app-start.sh +++ b/app/data/config/watcher-mobymask-v2/mobymask-app-start.sh @@ -9,22 +9,32 @@ CERC_DEPLOYED_CONTRACT="${CERC_DEPLOYED_CONTRACT:-${DEFAULT_CERC_DEPLOYED_CONTRA CERC_RELAY_NODES="${CERC_RELAY_NODES:-${DEFAULT_CERC_RELAY_NODES}}" CERC_APP_WATCHER_URL="${CERC_APP_WATCHER_URL:-${DEFAULT_CERC_APP_WATCHER_URL}}" +# If not set (or []), check the mounted volume for relay peer id +if [ -z "$CERC_RELAY_NODES" ] || [ "$CERC_RELAY_NODES" = "[]" ]; then + echo "CERC_RELAY_NODES not provided, taking from the mounted volume" + CERC_RELAY_NODES="[\"/ip4/127.0.0.1/tcp/9090/ws/p2p/$(jq -r '.id' /peers/relay-id.json)\"]" +fi + +echo "Using CERC_RELAY_NODES $CERC_RELAY_NODES" + # Use config from mounted volume if available (when running web-app along with watcher stack) if [ -f /server/config.json ]; then - echo "Merging config for deployed contract from mounted volume" - # Merging config files to get deployed contract address - jq -s '.[0] * .[1]' /app/src/mobymask-app-config.json /server/config.json > /app/src/config.json -else - echo "Setting deployed contract details from env" + echo "Taking config for deployed contract from mounted volume" - # Set config values from environment variables - jq --arg address "$CERC_DEPLOYED_CONTRACT" \ - --argjson chainId $CERC_CHAIN_ID \ - --argjson relayNodes "$CERC_RELAY_NODES" \ - '.address = $address | .chainId = $chainId | .relayNodes = $relayNodes' \ - /app/src/mobymask-app-config.json > /app/src/config.json + # Get deployed contract address and chain id + CERC_DEPLOYED_CONTRACT=$(jq -r '.address' /server/config.json | tr -d '"') + CERC_CHAIN_ID=$(jq -r '.chainId' /server/config.json) +else + echo "Taking deployed contract details from env" fi +# Export config values in a json file +jq --arg address "$CERC_DEPLOYED_CONTRACT" \ + --argjson chainId "$CERC_CHAIN_ID" \ + --argjson relayNodes "$CERC_RELAY_NODES" \ + '.address = $address | .chainId = $chainId | .relayNodes = $relayNodes' \ + /app/src/mobymask-app-config.json > /app/src/config.json + REACT_APP_WATCHER_URI="$CERC_APP_WATCHER_URL/graphql" npm run build serve -s build diff --git a/app/data/config/watcher-mobymask-v2/mobymask-params.env b/app/data/config/watcher-mobymask-v2/mobymask-params.env index 9f967170..22681036 100644 --- a/app/data/config/watcher-mobymask-v2/mobymask-params.env +++ b/app/data/config/watcher-mobymask-v2/mobymask-params.env @@ -5,6 +5,12 @@ DEFAULT_CERC_WATCHER_HOST="mobymask-watcher-server" DEFAULT_CERC_WATCHER_PORT=3001 DEFAULT_CERC_APP_WATCHER_URL="http://localhost:3001" +# Set of relay peers to connect to from the relay node +DEFAULT_CERC_RELAY_PEERS=[] + +# Domain to be used in the relay node's announce address +DEFAULT_CERC_RELAY_ANNOUNCE_DOMAIN= + # Base URI for mobymask-app (used for generating invite) DEFAULT_CERC_MOBYMASK_APP_BASE_URI="http://127.0.0.1:3002/#" @@ -18,5 +24,5 @@ DEFAULT_CERC_DEPLOYED_CONTRACT= # Chain ID is used by mobymask web-app for txs DEFAULT_CERC_CHAIN_ID=42069 -# Set relay nodes to be used by web-apps -DEFAULT_CERC_RELAY_NODES=["/ip4/127.0.0.1/tcp/9090/ws/p2p/12D3KooWSPCsVkHVyLQoCqhu2YRPvvM7o6r6NRYyLM5zeA6Uig5t"] +# Set of relay nodes to be used by web-apps +DEFAULT_CERC_RELAY_NODES=[] diff --git a/app/data/config/watcher-mobymask-v2/peer-id.json b/app/data/config/watcher-mobymask-v2/peer-id.json deleted file mode 100644 index ceb55fc0..00000000 --- a/app/data/config/watcher-mobymask-v2/peer-id.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "id": "12D3KooWK6myjc8r1KBnfP9igp31qJkPaVfsKDjKrjoSefV5SDEo", - "privKey": "CAESQJMHbMaH+UEOtjGOzXYtoPO/cdHakCtN1hcnknIWzx/6ie1lxb+8kfzBjwt7apfj8fHlTCYSIVK8Q2AWu9a2h3g=", - "pubKey": "CAESIIntZcW/vJH8wY8Le2qX4/Hx5UwmEiFSvENgFrvWtod4" -} diff --git a/app/data/config/watcher-mobymask-v2/peer.env b/app/data/config/watcher-mobymask-v2/peer.env deleted file mode 100644 index 4cce4d9a..00000000 --- a/app/data/config/watcher-mobymask-v2/peer.env +++ /dev/null @@ -1 +0,0 @@ -RELAY="/ip4/127.0.0.1/tcp/9090/ws/p2p/12D3KooWSPCsVkHVyLQoCqhu2YRPvvM7o6r6NRYyLM5zeA6Uig5t" diff --git a/app/data/config/watcher-mobymask-v2/relay-id.json b/app/data/config/watcher-mobymask-v2/relay-id.json deleted file mode 100644 index d7edc6dc..00000000 --- a/app/data/config/watcher-mobymask-v2/relay-id.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "id": "12D3KooWSPCsVkHVyLQoCqhu2YRPvvM7o6r6NRYyLM5zeA6Uig5t", - "privKey": "CAESQGsqG5o4VlWJZM9XlA3MjabyZOXWQ2MLZU5AhBQsjXGt9iSlGtTuNOrHX5xSRgLBxLuMoqWsjGxE/dDB9c46RI8=", - "pubKey": "CAESIPYkpRrU7jTqx1+cUkYCwcS7jKKlrIxsRP3QwfXOOkSP" -} diff --git a/app/data/config/watcher-mobymask-v2/start-server.sh b/app/data/config/watcher-mobymask-v2/start-server.sh index ee7b73c3..b5a3518e 100755 --- a/app/data/config/watcher-mobymask-v2/start-server.sh +++ b/app/data/config/watcher-mobymask-v2/start-server.sh @@ -7,11 +7,34 @@ fi CERC_L2_GETH_RPC="${CERC_L2_GETH_RPC:-${DEFAULT_CERC_L2_GETH_RPC}}" CERC_PRIVATE_KEY_PEER="${CERC_PRIVATE_KEY_PEER:-${DEFAULT_CERC_PRIVATE_KEY_PEER}}" +CERC_RELAY_PEERS="${CERC_RELAY_PEERS:-${DEFAULT_CERC_RELAY_PEERS}}" +CERC_RELAY_ANNOUNCE_DOMAIN="${CERC_RELAY_ANNOUNCE_DOMAIN:-${DEFAULT_CERC_RELAY_ANNOUNCE_DOMAIN}}" CERC_ENABLE_PEER_L2_TXS="${CERC_ENABLE_PEER_L2_TXS:-${DEFAULT_CERC_ENABLE_PEER_L2_TXS}}" CERC_DEPLOYED_CONTRACT="${CERC_DEPLOYED_CONTRACT:-${DEFAULT_CERC_DEPLOYED_CONTRACT}}" echo "Using L2 RPC endpoint ${CERC_L2_GETH_RPC}" +# Check for peer ids in ./peers folder, create if not present +if [ -f ./peers/relay-id.json ]; then + echo "Using peer id for relay node from the mounted volume" +else + echo "Creating a new peer id for relay node" + cd ../peer + yarn create-peer -f ../mobymask-v2-watcher/peers/relay-id.json + cd ../mobymask-v2-watcher +fi + +if [ -f ./peers/peer-id.json ]; then + echo "Using peer id for peer node from the mounted volume" +else + echo "Creating a new peer id for peer node" + cd ../peer + yarn create-peer -f ../mobymask-v2-watcher/peers/peer-id.json + cd ../mobymask-v2-watcher +fi + +CERC_RELAY_MULTIADDR="/dns4/mobymask-watcher-server/tcp/9090/ws/p2p/$(jq -r '.id' ./peers/relay-id.json)" + # Use contract address from environment variable or set from config.json in mounted volume if [ -n "$CERC_DEPLOYED_CONTRACT" ]; then CONTRACT_ADDRESS="${CERC_DEPLOYED_CONTRACT}" @@ -28,11 +51,13 @@ else echo "Using CERC_PRIVATE_KEY_PEER from env" fi - # Read in the config template TOML file and modify it WATCHER_CONFIG_TEMPLATE=$(cat environments/watcher-config-template.toml) WATCHER_CONFIG=$(echo "$WATCHER_CONFIG_TEMPLATE" | \ - sed -E "s/REPLACE_WITH_CERC_ENABLE_PEER_L2_TXS/${CERC_ENABLE_PEER_L2_TXS}/g; \ + sed -E "s|REPLACE_WITH_CERC_RELAY_PEERS|${CERC_RELAY_PEERS}|g; \ + s/REPLACE_WITH_CERC_RELAY_ANNOUNCE_DOMAIN/${CERC_RELAY_ANNOUNCE_DOMAIN}/g; \ + s|REPLACE_WITH_CERC_RELAY_MULTIADDR|${CERC_RELAY_MULTIADDR}|g; \ + s/REPLACE_WITH_CERC_ENABLE_PEER_L2_TXS/${CERC_ENABLE_PEER_L2_TXS}/g; \ s/REPLACE_WITH_CERC_PRIVATE_KEY_PEER/${CERC_PRIVATE_KEY_PEER}/g; \ s/REPLACE_WITH_CONTRACT_ADDRESS/${CONTRACT_ADDRESS}/g; \ s|REPLACE_WITH_CERC_L2_GETH_RPC_ENDPOINT|${CERC_L2_GETH_RPC}| ") @@ -40,5 +65,8 @@ WATCHER_CONFIG=$(echo "$WATCHER_CONFIG_TEMPLATE" | \ # Write the modified content to a new file echo "$WATCHER_CONFIG" > environments/local.toml +# Write the relay node's multiaddr to /app/packages/peer/.env for running tests +echo "RELAY=\"$CERC_RELAY_MULTIADDR\"" > /app/packages/peer/.env + echo 'yarn server' yarn server diff --git a/app/data/config/watcher-mobymask-v2/test-app-config.json b/app/data/config/watcher-mobymask-v2/test-app-config.json index 3b00674f..cce15fd8 100644 --- a/app/data/config/watcher-mobymask-v2/test-app-config.json +++ b/app/data/config/watcher-mobymask-v2/test-app-config.json @@ -1,7 +1,5 @@ { - "relayNodes": [ - "/ip4/127.0.0.1/tcp/9090/ws/p2p/12D3KooWSPCsVkHVyLQoCqhu2YRPvvM7o6r6NRYyLM5zeA6Uig5t" - ], + "relayNodes": [], "peer": { "enableDebugInfo": true } diff --git a/app/data/config/watcher-mobymask-v2/test-app-start.sh b/app/data/config/watcher-mobymask-v2/test-app-start.sh index 2f45da03..ef7aa539 100755 --- a/app/data/config/watcher-mobymask-v2/test-app-start.sh +++ b/app/data/config/watcher-mobymask-v2/test-app-start.sh @@ -6,7 +6,15 @@ fi CERC_RELAY_NODES="${CERC_RELAY_NODES:-${DEFAULT_CERC_RELAY_NODES}}" -# Set relay nodes in config from CERC_RELAY_NODES environment variable +# If not set (or []), check the mounted volume for relay peer id +if [ -z "$CERC_RELAY_NODES" ] || [ "$CERC_RELAY_NODES" = "[]" ]; then + echo "CERC_RELAY_NODES not provided, taking from the mounted volume" + CERC_RELAY_NODES="[\"/ip4/127.0.0.1/tcp/9090/ws/p2p/$(jq -r '.id' /peers/relay-id.json)\"]" +fi + +echo "Using CERC_RELAY_NODES $CERC_RELAY_NODES" + +# Set relay nodes in config using CERC_RELAY_NODES jq --argjson relayNodes "$CERC_RELAY_NODES" \ '.relayNodes = $relayNodes' \ ./src/test-app-config.json > ./src/config.json diff --git a/app/data/config/watcher-mobymask-v2/watcher-config-template.toml b/app/data/config/watcher-mobymask-v2/watcher-config-template.toml index 843cdbfe..e6ce0750 100644 --- a/app/data/config/watcher-mobymask-v2/watcher-config-template.toml +++ b/app/data/config/watcher-mobymask-v2/watcher-config-template.toml @@ -26,14 +26,15 @@ [server.p2p.relay] host = "0.0.0.0" port = 9090 - relayPeers = [] - peerIdFile = './relay-id.json' + relayPeers = REPLACE_WITH_CERC_RELAY_PEERS + peerIdFile = './peers/relay-id.json' + announce = 'REPLACE_WITH_CERC_RELAY_ANNOUNCE_DOMAIN' enableDebugInfo = true [server.p2p.peer] - relayMultiaddr = '/dns4/mobymask-watcher-server/tcp/9090/ws/p2p/12D3KooWSPCsVkHVyLQoCqhu2YRPvvM7o6r6NRYyLM5zeA6Uig5t' + relayMultiaddr = 'REPLACE_WITH_CERC_RELAY_MULTIADDR' pubSubTopic = 'mobymask' - peerIdFile = './peer-id.json' + peerIdFile = './peers/peer-id.json' enableDebugInfo = true enableL2Txs = REPLACE_WITH_CERC_ENABLE_PEER_L2_TXS diff --git a/app/data/stacks/mobymask-v2/README.md b/app/data/stacks/mobymask-v2/README.md index ab36f302..9dcca6c0 100644 --- a/app/data/stacks/mobymask-v2/README.md +++ b/app/data/stacks/mobymask-v2/README.md @@ -122,8 +122,8 @@ Clear volumes created by this stack: ```bash # List all relevant volumes -docker volume ls -q --filter "name=.*mobymask_watcher_db_data|.*mobymask_deployment|.*fixturenet_geth_accounts|.*l1_deployment|.*l2_accounts|.*l2_config|.*l2_geth_data" +docker volume ls -q --filter "name=.*mobymask_watcher_db_data|.*peers_ids|.*mobymask_deployment|.*fixturenet_geth_accounts|.*l1_deployment|.*l2_accounts|.*l2_config|.*l2_geth_data" # Remove all the listed volumes -docker volume rm $(docker volume ls -q --filter "name=.*mobymask_watcher_db_data|.*mobymask_deployment|.*fixturenet_geth_accounts|.*l1_deployment|.*l2_accounts|.*l2_config|.*l2_geth_data") +docker volume rm $(docker volume ls -q --filter "name=.*mobymask_watcher_db_data|.*peers_ids|.*mobymask_deployment|.*fixturenet_geth_accounts|.*l1_deployment|.*l2_accounts|.*l2_config|.*l2_geth_data") ``` diff --git a/app/data/stacks/mobymask-v2/mobymask-only.md b/app/data/stacks/mobymask-v2/mobymask-only.md index 27073034..f4d25702 100644 --- a/app/data/stacks/mobymask-v2/mobymask-only.md +++ b/app/data/stacks/mobymask-v2/mobymask-only.md @@ -57,6 +57,12 @@ Create and update an env file to be used in the next step ([defaults](../../conf # (used for generating a root invite link after deploying the contract) CERC_MOBYMASK_APP_BASE_URI="http://127.0.0.1:3002/#" + # (Optional) Set of relay peers to connect to from the relay node + CERC_RELAY_PEERS=[] + + # (Optional) Domain to be used in the relay node's announce address + CERC_RELAY_ANNOUNCE_DOMAIN= + # Set to false for disabling watcher peer to send txs to L2 CERC_ENABLE_PEER_L2_TXS=true @@ -112,8 +118,8 @@ Clear volumes created by this stack: ```bash # List all relevant volumes -docker volume ls -q --filter "name=.*mobymask_watcher_db_data|.*mobymask_deployment|.*fixturenet_geth_accounts" +docker volume ls -q --filter "name=.*mobymask_watcher_db_data|.*peers_ids|.*mobymask_deployment|.*fixturenet_geth_accounts" # Remove all the listed volumes -docker volume rm $(docker volume ls -q --filter "name=.*mobymask_watcher_db_data|.*mobymask_deployment|.*fixturenet_geth_accounts") +docker volume rm $(docker volume ls -q --filter "name=.*mobymask_watcher_db_data|.*peers_ids|.*mobymask_deployment|.*fixturenet_geth_accounts") ``` diff --git a/app/data/stacks/mobymask-v2/web-apps.md b/app/data/stacks/mobymask-v2/web-apps.md index 2c1ed253..09d6834d 100644 --- a/app/data/stacks/mobymask-v2/web-apps.md +++ b/app/data/stacks/mobymask-v2/web-apps.md @@ -41,8 +41,10 @@ This should create the required docker images in the local image registry Create and update an env file to be used in the next step ([defaults](../../config/watcher-mobymask-v2/mobymask-params.env)): ```bash - # Set relay nodes to be used by the web-app - CERC_RELAY_NODES=["/ip4/127.0.0.1/tcp/9090/ws/p2p/12D3KooWSPCsVkHVyLQoCqhu2YRPvvM7o6r6NRYyLM5zeA6Uig5t"] + # Set of relay nodes to be used by the web-app + # (use double quotes " for strings) + # Eg. CERC_RELAY_NODES=["/dns4/example.com/tcp/443/wss/p2p/12D3KooWGHmDDCc93XUWL16FMcTPCGu2zFaMkf67k8HZ4gdQbRDr"] + CERC_RELAY_NODES=[] # Also add if running MobyMask app: @@ -111,8 +113,8 @@ Clear volumes created by this stack: ```bash # List all relevant volumes -docker volume ls -q --filter "name=.*mobymask_deployment" +docker volume ls -q --filter "name=.*mobymask_deployment|.*peers_ids" # Remove all the listed volumes -docker volume rm $(docker volume ls -q --filter "name=.*mobymask_deployment") +docker volume rm $(docker volume ls -q --filter "name=.*mobymask_deployment|.*peers_ids") ```