Replace laconicd with optimism in mobymask-v2 stack (#272)

* Remove laconicd to use optimism endpoint

* Use fixturenet-optimism stack for mobymask-v2-watcher

* Fix setting L1 account private key in mobymask-v2 stack

Former-commit-id: b266ac78b4
This commit is contained in:
2023-04-03 18:13:29 +05:30
committed by GitHub
parent 1881554ae0
commit f23c22d5b9
14 changed files with 92 additions and 101 deletions
@@ -25,7 +25,7 @@ services:
- ../config/fixturenet-eth/fixturenet-eth.env
image: cerc/fixturenet-eth-geth:local
volumes:
- fixturenet-geth-accounts:/opt/testnet/build/el
- fixturenet_geth_accounts:/opt/testnet/build/el
healthcheck:
test: ["CMD", "nc", "-v", "localhost", "8545"]
interval: 30s
@@ -111,4 +111,4 @@ services:
condition: service_healthy
volumes:
fixturenet-geth-accounts:
fixturenet_geth_accounts:
@@ -18,9 +18,9 @@ services:
- ../config/fixturenet-optimism/optimism-contracts/send-balance.ts:/app/packages/contracts-bedrock/tasks/send-balance.ts
- ../config/fixturenet-optimism/optimism-contracts/update-config.js:/app/packages/contracts-bedrock/update-config.js
- ../config/fixturenet-optimism/optimism-contracts/run.sh:/app/packages/contracts-bedrock/run.sh
- fixturenet-geth-accounts:/geth-accounts:ro
- l2-accounts:/l2-accounts
- l1-deployment:/app/packages/contracts-bedrock
- fixturenet_geth_accounts:/geth-accounts:ro
- l2_accounts:/l2-accounts
- l1_deployment:/app/packages/contracts-bedrock
op-node-l2-config-gen:
image: cerc/optimism-op-node:local
@@ -31,7 +31,7 @@ services:
L1_RPC: "http://fixturenet-eth-geth-1:8545"
volumes:
- ../config/fixturenet-optimism/generate-l2-config.sh:/app/generate-l2-config.sh
- l1-deployment:/contracts-bedrock:ro
- l1_deployment:/contracts-bedrock:ro
- op_node_data:/app
command: ["sh", "/app/generate-l2-config.sh"]
@@ -43,7 +43,7 @@ services:
volumes:
- ../config/fixturenet-optimism/run-op-geth.sh:/run-op-geth.sh
- op_node_data:/op-node:ro
- l2-accounts:/l2-accounts:ro
- l2_accounts:/l2-accounts:ro
entrypoint: "sh"
command: "/run-op-geth.sh"
ports:
@@ -64,8 +64,8 @@ services:
image: cerc/optimism-op-node:local
volumes:
- ../config/fixturenet-optimism/run-op-node.sh:/app/run-op-node.sh
- op_node_data:/app:ro
- l2-accounts:/l2-accounts:ro
- op_node_data:/op-node-data:ro
- l2_accounts:/l2-accounts:ro
command: ["sh", "/app/run-op-node.sh"]
ports:
- "8547"
@@ -80,6 +80,8 @@ services:
environment:
L1_RPC: "http://fixturenet-eth-geth-1:8545"
depends_on:
fixturenet-eth-geth-1:
condition: service_healthy
op-node:
condition: service_healthy
op-geth:
@@ -87,11 +89,11 @@ services:
image: cerc/optimism-op-batcher:local
volumes:
- ../config/fixturenet-optimism/run-op-batcher.sh:/run-op-batcher.sh
- l2-accounts:/l2-accounts:ro
- l2_accounts:/l2-accounts:ro
entrypoint: "sh"
command: "/run-op-batcher.sh"
volumes:
op_node_data:
l2-accounts:
l1-deployment:
l2_accounts:
l1_deployment:
@@ -25,12 +25,22 @@ services:
restart: unless-stopped
image: cerc/mobymask:local
working_dir: /app/packages/server
depends_on:
op-node:
condition: service_healthy
op-geth:
condition: service_healthy
# TODO: Configure env file for ETH RPC URL & private key
environment:
- ENV=PROD
command: ["sh", "-c", "npm start"]
command: ["sh", "./deploy-invite.sh"]
volumes:
- ../config/watcher-mobymask-v2/secrets.json:/app/packages/server/secrets.json
# TODO: add a script to set rpc endpoint from env
# add manually if running seperately
- ../config/watcher-mobymask-v2/secrets-template.json:/app/packages/server/secrets-template.json
- ../config/watcher-mobymask-v2/deploy-invite.sh:/app/packages/server/deploy-invite.sh
- moby_data_server:/app/packages/server
- fixturenet_geth_accounts:/geth-accounts:ro
healthcheck:
test: ["CMD", "nc", "-v", "localhost", "3330"]
interval: 20s
@@ -39,6 +49,7 @@ services:
start_period: 10s
mobymask-watcher-server:
# TODO: pass optimism rpc endpoint
restart: unless-stopped
depends_on:
mobymask-watcher-db:
@@ -48,12 +59,15 @@ services:
image: cerc/watcher-mobymask-v2:local
command: ["sh", "server-start.sh"]
volumes:
# TODO: add a script to set rpc endpoint from env
# add manually if running seperately
- ../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/server-start.sh:/app/packages/mobymask-v2-watcher/server-start.sh
- moby_data_server:/server
- fixturenet_geth_accounts:/geth-accounts:ro
ports:
- "0.0.0.0:3001:3001"
- "0.0.0.0:9001:9001"
@@ -65,6 +79,7 @@ services:
retries: 15
start_period: 5s
# TODO: Move to a separate pod
mobymask-app:
depends_on:
mobymask-watcher-server:
@@ -109,11 +124,4 @@ services:
volumes:
mobymask_watcher_db_data:
moby_data_server:
networks:
# https://docs.docker.com/compose/networking/#configure-the-default-network
default:
# https://docs.docker.com/compose/networking/#use-a-pre-existing-network
name: mobymask-v2-network
external: true
fixturenet_geth_accounts: