-
Gilles Filippini authored
Using websocket address form (tcp/30333/ws) for the RPC node and TCP form (tcp/30333) for the validator node, because as explained in the node-template / substrate documentation [1], the default listen addresses are: * /ip4/0.0.0.0/tcp/<port> and /ip6/[::]/tcp/<port> when using --validator * /ip4/0.0.0.0/tcp/<port>/ws and /ip6/[::]/tcp/<port>/ws otherwise. [1] https://docs.substrate.io/reference/command-line-tools/node-template/ The argument of the '--public-addr' duniter option should not feature the p2p endpoint part '/p2p/<PEER_ID>'. Duniter adds it automatically. For example, when using: --public-addr /dns/gdev.example.com/tcp/30333/ws you'll see this in the logs: Discovered new external address for our node: /dns/gdev.example.com/tcp/30333/ws/p2p/<PEER_ID> When using: --public-addr /dns/gdev.example.com/tcp/30333/ws/p2p/<PEER_ID> you'll see: Discovered new external address for our node: /dns/gdev.example.com/tcp/30333/ws/p2p/<PEER_ID>/p2p/<PEER_ID> which is erroneous obviously.
Gilles Filippini authoredUsing websocket address form (tcp/30333/ws) for the RPC node and TCP form (tcp/30333) for the validator node, because as explained in the node-template / substrate documentation [1], the default listen addresses are: * /ip4/0.0.0.0/tcp/<port> and /ip6/[::]/tcp/<port> when using --validator * /ip4/0.0.0.0/tcp/<port>/ws and /ip6/[::]/tcp/<port>/ws otherwise. [1] https://docs.substrate.io/reference/command-line-tools/node-template/ The argument of the '--public-addr' duniter option should not feature the p2p endpoint part '/p2p/<PEER_ID>'. Duniter adds it automatically. For example, when using: --public-addr /dns/gdev.example.com/tcp/30333/ws you'll see this in the logs: Discovered new external address for our node: /dns/gdev.example.com/tcp/30333/ws/p2p/<PEER_ID> When using: --public-addr /dns/gdev.example.com/tcp/30333/ws/p2p/<PEER_ID> you'll see: Discovered new external address for our node: /dns/gdev.example.com/tcp/30333/ws/p2p/<PEER_ID>/p2p/<PEER_ID> which is erroneous obviously.
gdev-mirror.docker-compose.yml 801 B
# This is a docker template for running a gdev mirror
version: "3.5"
services:
duniter-rpc:
image: duniter/duniter-v2s:v0.4.0
restart: unless-stopped
ports:
# telemetry
- 127.0.0.1:9615:9615
# rpc
- 127.0.0.1:9933:9933
# rpc-ws
- 127.0.0.1:9944:9944
# p2p
- 30333:30333
volumes:
- ./node.key:/etc/duniter/node.key
- duniter-rpc-data:/var/lib/duniter/
environment:
- DUNITER_CHAIN_NAME=gdev
command:
- "--node-key-file"
- "/var/lib/duniter/node.key"
- "--public-addr"
# SERVER_DOMAIN should be replaced by a domain name that point on your server
- "/dns/${SERVER_DOMAIN?SERVER_DOMAIN should be set}/tcp/30333/ws"
- "--rpc-cors"
- "all"
volumes:
duniter-rpc-data: