This a Dockerfile + Docker-compose I am using to run a single Fantom node (for API, not staking) in production for a few months.
It will setup an Opera node with a Letsencrypt HTTPS endpoint in front.
Latest snapshot URL can be found here
Copy the .env template:
cp .env.template .env
and fill your variables.
Run with docker-compose:
docker-compose up -d --build
Node will eat your disk space from time to time. You have two options:
-
wipe the data so restarting the container will redownload latest snapshot:
rm -fr data/*
-
restart in prune mode (usually faster than redownloading latest snapshot) by setting .env:
STARTUP_ACTION=prune