chore: move docker env var from Dockerfile to entrypoints

This commit is contained in:
Zaiming Shi 2021-04-26 10:49:14 +02:00 committed by Zaiming (Stone) Shi
parent 6c403061db
commit 4bc349b596
2 changed files with 6 additions and 6 deletions

View File

@ -78,10 +78,4 @@ EXPOSE 1883 8081 8083 8084 8883 11883 18083 4369 4370 5369 6369 6370
ENTRYPOINT ["/usr/bin/docker-entrypoint.sh"] ENTRYPOINT ["/usr/bin/docker-entrypoint.sh"]
# The default rpc port discovery 'stateless' is mostly for clusters
# having static node names. So it's troulbe-free for multiple emqx nodes
# running on the same host.
# When start emqx in docker, it's mostly one emqx node in one container
ENV EMQX_RPC__PORT_DISCOVERY=manual
CMD ["/opt/emqx/bin/emqx", "foreground"] CMD ["/opt/emqx/bin/emqx", "foreground"]

View File

@ -129,4 +129,10 @@ if [[ -n "$EMQX_LOADED_MODULES" ]]; then
fill_tuples "$LOADED_MODULES" "$EMQX_LOADED_MODULES" fill_tuples "$LOADED_MODULES" "$EMQX_LOADED_MODULES"
fi fi
# The default rpc port discovery 'stateless' is mostly for clusters
# having static node names. So it's troulbe-free for multiple emqx nodes
# running on the same host.
# When start emqx in docker, it's mostly one emqx node in one container
export EMQX_RPC__PORT_DISCOVERY="${EMQX_RPC__PORT_DISCOVERY:-manual}"
exec "$@" exec "$@"