read.cash Log in
@ClearSky edited

How to run Testnet Faucet Easily Using Docker The Light Crypto Faucet is a faucet that allows distribution of testnet coins supported by the Electron Cash wallet. I've created a Docker file that allows to easily host the faucet on a docker container. Here I'll explain how to easily run the faucet using Docker. Running with Docker The easiest way to run the faucet is by using Docker. First step is to clone the repository: git clone https://gitlab.com/uak/light-crypto-faucet.git Then inside the cloned dir, run the following command where `Dockerfile` exists: sudo DOCKER_BUILDKIT=1 docker build --progress=plain . --tag=faucet_image It should create a docker container of the faucet. Create a Docker volume to store the data: sudo docker volume create faucet_volume Run the faucet: sudo docker run -d --restart always -v faucet_volume:/home/user/data -p 3004:8080 -e network_options=testnet,testnet4,chipnet -e testnet4_rpc_user=user -e testnet_rpc_user=user -e chipnet_rpc_user=user -e web_access_log=access.log -e web_error_log=error.log faucet_image Don't be scared. Probably I should make it shorter but it's just telling the following: `-d` means run in Daemon mode, otherwise it will just run in the terminal session `--restart always` is telling to restart the container in case of error or server shutdown `-v faucet_volume:/home/user/data` is to mount the internal `data` directory to the docker volume `-p 3004:8080` tells the container to expose the internal `8080` cherrypy port on host `3004` port `-e network_options=testnet,testnet4,chipnet` is specifyging the networks that the faucet will support other `-e` options are just setting env variables required to run the faucet, example: `testnet4_rpc_user=user` sets the user name of testnet4 rpc `web_access_log=access.log` sets the location of the web access log You can monitor the instances using: sudo docker ps You can visit the faucet on port `3004` it should be on something like: `127.0.0.1:3004` if you run it locally. For production the server should be behind a reverse proxy server as usual with docker hosted applications. More information You can find more information on the official page for the Light Crypto Faucet https://gitlab.com/uak/light-crypto-faucet/

No comments yet

Log in to join in Reading is open to everyone. Replying needs an account.