775 B · text History 7faf5f7
#!/bin/sh

# Long-name distribution so libcluster can reach this node from peers
# and Horde can sync the registry across the cluster.
#
# POD_IP is injected by the deployment from status.podIP. RELEASE_COOKIE
# comes from the elixir-args secret so every replica agrees on the
# Erlang cookie.
#
# Only enable name-distribution when POD_IP is actually populated —
# otherwise RELEASE_NODE becomes "diogramos@" and the BEAM aborts
# before Logger attaches, producing only a generic init crash.
if [ -n "${POD_IP}" ]; then
  echo "[env.sh] starting with name distribution as diogramos@${POD_IP}" >&2
  export RELEASE_DISTRIBUTION=name
  export RELEASE_NODE="diogramos@${POD_IP}"
else
  echo "[env.sh] POD_IP is empty — falling back to local-only sname distribution" >&2
fi