diff --git a/app/data/compose/docker-compose-mainnet-go-opera.yml b/app/data/compose/docker-compose-mainnet-go-opera.yml index b95ebaf3..4d798e7b 100644 --- a/app/data/compose/docker-compose-mainnet-go-opera.yml +++ b/app/data/compose/docker-compose-mainnet-go-opera.yml @@ -7,10 +7,11 @@ services: entrypoint: ["sh", "/docker-entrypoint-scripts.d/start-node.sh"] volumes: - ../config/mainnet-go-opera/start-node.sh:/docker-entrypoint-scripts.d/start-node.sh - network_mode: "host" + # network_mode: "host" # TODO: ports taken from dockerfile, determine which are needed ports: - "5050:5050" # p2p port, needed + - "5050:5050/udp" - "18545:18545" # http rpc port - "18546:18546" # websockets rpc port #- "18547" # unknown diff --git a/app/data/config/mainnet-go-opera/start-node.sh b/app/data/config/mainnet-go-opera/start-node.sh index 4c3ebbd5..7632c730 100644 --- a/app/data/config/mainnet-go-opera/start-node.sh +++ b/app/data/config/mainnet-go-opera/start-node.sh @@ -3,5 +3,5 @@ # download genesis file wget https://download.fantom.network/mainnet-109331-no-history.g -./opera --genesis=mainnet-109331-no-history.g --db.preset ldb-1 --syncmode snap --http --http.addr="0.0.0.0" --http.corsdomain="*" --http.api=eth,web3,net,txpool,ftm +./opera --genesis=mainnet-109331-no-history.g --db.preset ldb-1 --syncmode snap --http --http.addr="0.0.0.0" --http.corsdomain="*" --http.api=eth,web3,net,txpool,ftm --ws --ws.addr="0.0.0.0" --ws.origins="*" --ws.api=eth,web3,net,txpool,ftm --cache 8192 #tail -f /dev/null diff --git a/app/data/container-build/cerc-go-opera/build.sh b/app/data/container-build/cerc-go-opera/build.sh index 51bfe2f6..37e561a4 100755 --- a/app/data/container-build/cerc-go-opera/build.sh +++ b/app/data/container-build/cerc-go-opera/build.sh @@ -1,5 +1,12 @@ #!/usr/bin/env bash # Build cerc/go-opera source ${CERC_CONTAINER_BASE_DIR}/build-base.sh -#cp ${CERC_REPO_BASE_DIR}/go-opera/docker/Dockerfile.opera ${CERC_REPO_BASE_DIR}/go-opera/Dockerfile + +# Checkout appropriate release; refer to https://docs.fantom.foundation/ +OPERA_TAG=${OPERA_TAG:-release/1.1.2-rc.5} +git -C ${CERC_REPO_BASE_DIR}/go-opera checkout ${OPERA_TAG} + +# Repo's dockerfile gives build error because it's hardcoded for go 1.17; go 1.19 is required +sed -i 's/FROM golang:1\.[0-9]*-alpine as builder/FROM golang:1.19-alpine as builder/' ${CERC_REPO_BASE_DIR}/go-opera/docker/Dockerfile.opera + docker build -f ${CERC_REPO_BASE_DIR}/go-opera/docker/Dockerfile.opera -t cerc/go-opera:local ${build_command_args} ${CERC_REPO_BASE_DIR}/go-opera