Enable ETH_RPC and add health check
This commit is contained in:
parent
701faa3ee9
commit
1f85ad09ac
@ -7,11 +7,12 @@ services:
|
||||
lotus:
|
||||
environment:
|
||||
- DOCKER_LOTUS_IMPORT_SNAPSHOT=/var/lotus-snapshots/snapshot
|
||||
- LOTUS_FEVM_ENABLEETHRPC=true
|
||||
- LOTUS_API_LISTENADDRESS=/ip4/0.0.0.0/tcp/1234/http
|
||||
- LOTUS_LIBP2P_LISTENADDRESSES=/ip4/0.0.0.0/tcp/1235,/ip6/::/tcp/1235,/ip4/0.0.0.0/udp/1235/quic-v1,/ip6/::/udp/1235/quic-v1,/ip4/0.0.0.0/udp/1235/quic-v1/webtransport,/ip6/::/udp/1235/quic-v1/webtransport
|
||||
image: cerc/lotus-mainnet:local
|
||||
volumes:
|
||||
- ${LOTUS_SNAPSHOT_PATH}:/var/lotus-snapshots/snapshot
|
||||
- ${CERC_LOTUS_SNAPSHOT_PATH}:/var/lotus-snapshots/snapshot
|
||||
- parameters:/var/tmp/filecoin-proof-parameters
|
||||
- lotus-repo:/var/lib/lotus
|
||||
- lotus_shared:/root/.lotus
|
||||
@ -23,3 +24,9 @@ services:
|
||||
condition: on-failure
|
||||
delay: 30s
|
||||
entrypoint: ["sh", "/docker-lotus-entrypoint.sh"]
|
||||
healthcheck:
|
||||
test: ["CMD", "nc", "-vz", "localhost", "1234"]
|
||||
interval: 30s
|
||||
timeout: 10s
|
||||
retries: 40
|
||||
start_period: 3s
|
||||
|
@ -2,6 +2,16 @@
|
||||
|
||||
Instructions for deploying a Lotus snap-synced node (for both mainnet and calibnet )
|
||||
|
||||
## Prerequisite
|
||||
|
||||
Downloaded chain snapshot
|
||||
```bash
|
||||
aria2c -o mainnet-snapshot -x5 https://forest-archive.chainsafe.dev/latest/mainnet/
|
||||
|
||||
# or using wget
|
||||
wget -O mainnet-snapshot https://forest-archive.chainsafe.dev/latest/mainnet/
|
||||
```
|
||||
|
||||
## Clone the stack repo
|
||||
|
||||
```bash
|
||||
@ -28,14 +38,24 @@ laconic-so --stack ~/cerc/lotus-stack/stack-orchestrator/stacks/lotus-node deplo
|
||||
## Create a deployment
|
||||
|
||||
```bash
|
||||
$ laconic-so --stack ~/cerc/lotus-stack/stacks/lotus-node deploy init --map-ports-to-host any-same --output lotus-node.yml
|
||||
$ laconic-so --stack ~/cerc/lotus-stack/stacks/lotus-node deploy create --spec-file lotus-node.yml --deployment-dir lotus-node
|
||||
$ laconic-so --stack ~/cerc/lotus-stack/stack-orchestrator/stacks/lotus-node deploy init --map-ports-to-host any-same --output lotus-node.yml
|
||||
$ laconic-so --stack ~/cerc/lotus-stack/stack-orchestrator/stacks/lotus-node deploy create --spec-file lotus-node.yml --deployment-dir lotus-node-deployment
|
||||
```
|
||||
|
||||
### Start the container
|
||||
## Setup config
|
||||
|
||||
Set filepath of downloaded mainnet snapshot in config.env
|
||||
Inside deployment directory, open the `config.env` file and set following env variables:
|
||||
|
||||
```bash
|
||||
$ laconic-so deployment --dir lotus-node up
|
||||
# Filepath of downloaded mainnet snapshot
|
||||
CERC_LOTUS_SNAPSHOT_PATH=/path-to-file/mainnet-snapshot
|
||||
```
|
||||
|
||||
## Start the container
|
||||
|
||||
```bash
|
||||
$ laconic-so deployment --dir lotus-node-deployment up
|
||||
```
|
||||
|
||||
## Check status
|
||||
@ -47,7 +67,7 @@ $ laconic-so deployment --dir lotus-node up
|
||||
Stop all services running in the background:
|
||||
|
||||
```bash
|
||||
$ laconic-so deployment --dir lotus-node down
|
||||
$ laconic-so deployment --dir lotus-node-deployment down
|
||||
```
|
||||
|
||||
Clear volumes created by this stack:
|
||||
|
Loading…
Reference in New Issue
Block a user