fix: run emqx in docker with 'emqx' as node name by default

Prior to this commit (also 4.x), the docker entrypoint script
sets default node name to $(hostname), which is typically a hash
like '6ec088117e14' and the erlang distribution port (ekka_epmd)
and gen_rpc port becomes non-deterministic.

After this commit, docker nodes start by default as name `emqx`,
so that the ports are static unless name is specifically set by
user. (4370 for erlang distribution and 5370 for gen_rpc)
This commit is contained in:
Zaiming (Stone) Shi 2022-06-09 07:20:34 +02:00
parent 0aab063dd5
commit a9ca4e60fe
1 changed files with 1 additions and 1 deletions

View File

@ -19,7 +19,7 @@ LOCAL_IP=$(hostname -i | grep -oE '((25[0-5]|(2[0-4]|1[0-9]|[1-9]|)[0-9])\.){3}(
if [[ -z "$EMQX_NODE_NAME" ]]; then if [[ -z "$EMQX_NODE_NAME" ]]; then
if [[ -z "$EMQX_NAME" ]]; then if [[ -z "$EMQX_NAME" ]]; then
EMQX_NAME="$(hostname)" EMQX_NAME='emqx'
fi fi
if [[ -z "$EMQX_HOST" ]]; then if [[ -z "$EMQX_HOST" ]]; then