forked from cerc-io/stack-orchestrator
Add ability to run mobymask-v2 stack with external optimism endpoint (#279)
* Set optimism geth endpoint from env file
* Set L1 account private keys from env
* Only deploy contract and generate invite in mobymask container
* Add readme for running mobymask v2 stack independently
* Modify mobymask container to stop running server and update readmes
* Check deployer account balance before deploying contract
* Fix for checking account balance before deploying
* Update readme description
* Update MobyMask repo tag in readme
Former-commit-id: 94e38ceaba
This commit is contained in:
@@ -55,7 +55,7 @@ services:
|
||||
entrypoint: "sh"
|
||||
command: "/run-op-geth.sh"
|
||||
ports:
|
||||
- "8545"
|
||||
- "0.0.0.0:8545:8545"
|
||||
healthcheck:
|
||||
test: ["CMD", "nc", "-vz", "localhost:8545"]
|
||||
interval: 30s
|
||||
@@ -77,7 +77,7 @@ services:
|
||||
- l2_accounts:/l2-accounts:ro
|
||||
command: ["sh", "/app/run-op-node.sh"]
|
||||
ports:
|
||||
- "8547"
|
||||
- "0.0.0.0:8547:8547"
|
||||
healthcheck:
|
||||
test: ["CMD", "nc", "-vz", "localhost:8547"]
|
||||
interval: 30s
|
||||
|
||||
@@ -1,25 +0,0 @@
|
||||
version: "3.2"
|
||||
|
||||
services:
|
||||
laconicd:
|
||||
restart: unless-stopped
|
||||
image: cerc/laconicd:local
|
||||
command: ["sh", "/docker-entrypoint-scripts.d/create-fixturenet.sh"]
|
||||
volumes:
|
||||
- ../config/fixturenet-laconicd/create-fixturenet.sh:/docker-entrypoint-scripts.d/create-fixturenet.sh
|
||||
ports:
|
||||
- "9473"
|
||||
- "8545"
|
||||
- "8546"
|
||||
- "1317"
|
||||
healthcheck:
|
||||
test: ["CMD", "nc", "-v", "localhost", "8545"]
|
||||
interval: 20s
|
||||
timeout: 5s
|
||||
retries: 15
|
||||
start_period: 10s
|
||||
|
||||
networks:
|
||||
# https://docs.docker.com/compose/networking/#configure-the-default-network
|
||||
default:
|
||||
name: mobymask-v2-network
|
||||
@@ -22,45 +22,40 @@ services:
|
||||
start_period: 10s
|
||||
|
||||
mobymask:
|
||||
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
|
||||
env_file:
|
||||
- ../config/watcher-mobymask-v2/optimism-params.env
|
||||
environment:
|
||||
- ENV=PROD
|
||||
command: ["sh", "./deploy-and-generate-invite.sh"]
|
||||
command:
|
||||
- sh
|
||||
- -c
|
||||
- |
|
||||
./wait-for-it.sh -h $${L2_GETH_HOST} -p $${L2_GETH_PORT} -s -t 0 && \
|
||||
./wait-for-it.sh -h $${L2_NODE_HOST} -p $${L2_NODE_PORT} -s -t 0 && \
|
||||
./deploy-and-generate-invite.sh
|
||||
volumes:
|
||||
# TODO: add a script to set RPC endpoint from env
|
||||
# add manually if running seperately
|
||||
- ../config/wait-for-it.sh:/app/packages/server/wait-for-it.sh
|
||||
- ../config/watcher-mobymask-v2/secrets-template.json:/app/packages/server/secrets-template.json
|
||||
- ../config/watcher-mobymask-v2/deploy-and-generate-invite.sh:/app/packages/server/deploy-and-generate-invite.sh
|
||||
- moby_data_server:/app/packages/server
|
||||
- fixturenet_geth_accounts:/geth-accounts:ro
|
||||
healthcheck:
|
||||
test: ["CMD", "nc", "-v", "localhost", "3330"]
|
||||
interval: 20s
|
||||
timeout: 5s
|
||||
retries: 15
|
||||
start_period: 10s
|
||||
extra_hosts:
|
||||
- "host.docker.internal:host-gateway"
|
||||
|
||||
mobymask-watcher-server:
|
||||
# TODO: pass optimism RPC endpoint
|
||||
restart: unless-stopped
|
||||
depends_on:
|
||||
mobymask-watcher-db:
|
||||
condition: service_healthy
|
||||
mobymask:
|
||||
condition: service_healthy
|
||||
condition: service_completed_successfully
|
||||
image: cerc/watcher-mobymask-v2:local
|
||||
env_file:
|
||||
- ../config/watcher-mobymask-v2/optimism-params.env
|
||||
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
|
||||
@@ -78,6 +73,8 @@ services:
|
||||
timeout: 5s
|
||||
retries: 15
|
||||
start_period: 5s
|
||||
extra_hosts:
|
||||
- "host.docker.internal:host-gateway"
|
||||
|
||||
# TODO: Move to a separate pod
|
||||
mobymask-app:
|
||||
@@ -85,7 +82,7 @@ services:
|
||||
mobymask-watcher-server:
|
||||
condition: service_healthy
|
||||
mobymask:
|
||||
condition: service_healthy
|
||||
condition: service_completed_successfully
|
||||
image: cerc/mobymask-ui:local
|
||||
command: ["sh", "mobymask-app-start.sh"]
|
||||
volumes:
|
||||
|
||||
Reference in New Issue
Block a user