diff --git a/docker/README.md b/docker/README.md index 0110be191582010114cf4ac6e164a318b8f03405..f346b5cb765a336d47c345b35d8b340feb4e2d96 100644 --- a/docker/README.md +++ b/docker/README.md @@ -68,6 +68,9 @@ volumes: | `DUNITER_DISABLE_PROMETHEUS` | Boolean to disable the Prometheus endpoint on port 9615. | `false` | | `DUNITER_DISABLE_TELEMETRY` | Boolean to disable connecting to the Substrate telemetry server. | `false` | | `DUNITER_PRUNING_PROFILE` | _ `default`<br> _ `archive`: keep all blocks and state blocks<br> \* `light`: keep only last 256 state blocks and last 14400 blocks (one day duration) | `default` | +| `DUNITER_PUBLIC_RPC` | The public RPC endpoint to gossip on the network and make available in the apps. | None | +| `DUNITER_PUBLIC_SQUID` | The public Squid graphql endpoint to gossip on the network and make available in the apps. | None | +| `DUNITER_PUBLIC_ENDPOINTS` | Path to a JSON file containing public endpoints to gossip on the network. The file should use the following format:<br>```{"endpoints": [ { "protocol": "rpc", "address": "wss://gdev.example.com" }, { "protocol": "squid", "address": "gdev.example.com/graphql/v1" }]}``` | None | ## Other Duniter options diff --git a/docker/docker-entrypoint b/docker/docker-entrypoint index 3666aad0e0dc0310a7be807203167e5cbad149c1..1e064d757dc364b8319707c9ed7bb51a2f5a3406 100755 --- a/docker/docker-entrypoint +++ b/docker/docker-entrypoint @@ -59,6 +59,21 @@ if [ -n "$DUNITER_PUBLIC_ADDR" ]; then set -- "$@" --public-addr "$DUNITER_PUBLIC_ADDR" fi +# Define public RPC endpoint (gossiped on the network) +if [ -n "$DUNITER_PUBLIC_RPC" ]; then + set -- "$@" --public-rpc "$DUNITER_PUBLIC_RPC" +fi + +# Define public Squid endpoint (gossiped on the network) +if [ -n "$DUNITER_PUBLIC_SQUID" ]; then + set -- "$@" --public-squid "$DUNITER_PUBLIC_SQUID" +fi + +# Define public endpoints from JSON file (gossiped on the network) +if [ -n "$DUNITER_PUBLIC_ENDPOINTS" ]; then + set -- "$@" --public-endpoints "$DUNITER_PUBLIC_ENDPOINTS" +fi + # Define listen address (inside docker) if [ -n "$DUNITER_LISTEN_ADDR" ]; then set -- "$@" --listen-addr "$DUNITER_LISTEN_ADDR"