# Lotus full node on the Napoleon testnet, with Docker Compose. # # Guide, with every setting explained: # https://lotusia.network/docs/docker-compose/#testnet # # Same .env as the mainnet file (LOTUSD_TAG, LOTUS_UID, LOTUS_GID, RPCAUTH) # plus TESTNET_DATA_DIR, TESTNET_P2P_PORT and TESTNET_RPC_PORT. It can run # next to the mainnet node on the same host: other ports, other folder. # # mkdir -p data-testnet # docker compose -f docker-compose.testnet.yml up -d # docker compose -f docker-compose.testnet.yml run --rm cli getblockchaininfo # # Testnet coins have no value. name: lotus-testnet services: lotusd: image: ghcr.io/lotusdevorg/lotusd:${LOTUSD_TAG:?set LOTUSD_TAG in .env} pull_policy: always restart: unless-stopped stop_grace_period: 900s network_mode: host user: "${LOTUS_UID:-1000}:${LOTUS_GID:-1000}" ulimits: nofile: { soft: 65535, hard: 65535 } volumes: # The node keeps this network's files in /napoleontest. - ${TESTNET_DATA_DIR:-./data-testnet}:/data logging: driver: json-file options: { max-size: "50m", max-file: "3" } healthcheck: test: ["CMD", "bash", "-c", "exec 3<>/dev/tcp/127.0.0.1/${TESTNET_RPC_PORT:-20604} && printf 'GET /api/v1/health HTTP/1.0\\r\\nHost: localhost\\r\\n\\r\\n' >&3 && head -n 1 <&3 | grep -q ' 200 '"] interval: 60s timeout: 10s retries: 5 start_period: 15m command: # Our test network: Napoleon active from block 1, every port = the # mainnet port + 10000. - -napoleontestnet - -datadir=/data - -printtoconsole - -shrinkdebugfile=1 - -asyncindex=0 - -disablewallet=1 - -modules=empp,rank,pokr,blob,slp,alp - -parentp2p=all - -listen=1 - -port=${TESTNET_P2P_PORT:-20605} - -upnp=0 - -maxconnections=128 - -peertimeout=300 # This network has no DNS seed: connect to a public testnet node. - -addnode=51.91.36.126:20605 - -dbcache=300 - -rpcthreads=8 - -proofserver=1 - -blockfilterindex=basic - -peerblockfilters=1 - -rpcbind=127.0.0.1:${TESTNET_RPC_PORT:-20604} - -rpcallowip=127.0.0.1/32 - -rpcauth=${RPCAUTH:-} cli: image: ghcr.io/lotusdevorg/lotus-cli:${LOTUSD_TAG:?set LOTUSD_TAG in .env} profiles: ["cli"] network_mode: host user: "${LOTUS_UID:-1000}:${LOTUS_GID:-1000}" volumes: - ${TESTNET_DATA_DIR:-./data-testnet}:/data:ro entrypoint: ["lotus-cli", "-napoleontestnet", "-datadir=/data", "-rpcport=${TESTNET_RPC_PORT:-20604}"]