Production-ready docker-compose for NXTP routers.
- Docker CE (Community Edition) version 20.10.5 or higher
- Docker Compose version 1.27.4 or higher
- Clone repo
cd ~
git clone https://github.com/connext/nxtp-router-docker-compose.git
- Rename file
.env.example
to.env
and modify it. You need to set next environment variables:
ROUTER_VERSION
- version to use, images found here: https://github.com/connext/nxtp/pkgs/container/nxtp-routerLOGDNA_KEY
- set LogDNA Ignestion keyLOGDNA_TAG
- optionally set LogDNA tagROUTER_EXTERNAL_PORT
,GRAFANA_EXTERNAL_PORT
,ROUTER_METRICS_PORT
- modify ports for external access
- (Optional) Modify
.env
file and set alert notifications to Slack or Discord.
For Discord set:
DISCORD_WEBHOOK
- Discord webhook full url
Modify docker-compose.yml
file and uncomment (remove #) for all alertmanager-discord
section.
Note: for Discord notifications used two containers alertmanager
and alertmanager-discord
-
Create NXTP configuration file
~/nxtp-router-docker-compose/config.json
, it will be mounted into router container. See Connext docs for configuration description. -
Create Web3Signer yaml key file
~/nxtp-router-docker-compose/key.yaml
, it will be mounted into the router container. See Web3Signer docs. And for more custom commands of web3signer, edit~/nxtp-router-docker-compose/data/signerConfig/config.yaml
. Refer Web3Signer Command docs -
Create docker-compose services, volumes and network.
cd ~/nxtp-router-docker-compose
docker-compose create
- Run docker-compose stack.
docker-compose up -d
- Check the status.
docker-compose ps
OR
docker ps -a
- Check the logs.
docker-compose logs
OR
docker-compose logs router
You can also use these commands.
docker logs router
- Stop and delete containers.
docker-compose down
docker-compose restart
- Modify
.env
to changeNXTP_VERSION
- Update stack
docker-compose pull
docker-compose up -d
Update latestVersion
file in the repo to automatically update production router.