medicode / rel /env.sh.eex
noahsettersten's picture
chore: Simplify node name to connect from Livebook
457577d
raw
history blame
708 Bytes
#!/bin/sh
# configure node for distributed erlang with IPV6 support
# For some reason, we need to disable `ERL_AFLAGS` and add `ELIXIR_ERL_OPTIONS` to be able to connect to this node from
# Livebook. See this forum post: https://community.fly.io/t/cant-connect-to-node/17800
# export ERL_AFLAGS="-proto_dist inet6_tcp"
export ELIXIR_ERL_OPTIONS="-proto_dist inet6_tcp"
export ECTO_IPV6="true"
export DNS_CLUSTER_QUERY="${FLY_APP_NAME}.internal"
export RELEASE_DISTRIBUTION="name"
# For ease of connecting from Livebook, we've removed `FLY_IMAGE_REF` from our node name.
# export RELEASE_NODE="${FLY_APP_NAME}-${FLY_IMAGE_REF##*-}@${FLY_PRIVATE_IP}"
export RELEASE_NODE="${FLY_APP_NAME}@${FLY_PRIVATE_IP}"