Keep ELIXIR_ERL_OPTIONS and ERL_*FLAGS distinct (#2684)

This commit is contained in:
José Valim 2024-06-25 22:13:22 +02:00 committed by GitHub
parent 7a00bc73ae
commit 5d0df62839
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 12 additions and 1 deletions

View file

@ -292,6 +292,10 @@ The following environment variables can be used to configure Livebook on boot:
iframe. Set it to "true" to enable it. If you do enable it, then the application
must run with HTTPS.
The environment variables `ERL_AFLAGS` and `ERL_ZFLAGS` can also be set to configure
Livebook and the notebook runtimes. `ELIXIR_ERL_OPTIONS` are also available to customize
Livebook, but it is not forwarded to runtimes.
<!-- Environment variables -->
If running Livebook via the command line, run `livebook server --help` to see

View file

@ -1,6 +1,13 @@
if [ "$LIVEBOOK_CLUSTER" = "auto" ] && [ ! -z "$FLY_APP_NAME" ]; then
export ERL_AFLAGS="-proto_dist inet6_tcp"
export LIVEBOOK_CLUSTER="dns:${FLY_APP_NAME}.internal"
case "$ERL_AFLAGS $ERL_ZFLAGS" in
*"-proto_dist"*) ;;
*)
export ERL_AFLAGS="$ERL_AFLAGS -proto_dist inet6_tcp"
;;
esac
if [ -z "${LIVEBOOK_NODE}" ];
then export LIVEBOOK_NODE="${FLY_APP_NAME}-${FLY_IMAGE_REF##*-}@${FLY_PRIVATE_IP}";
fi