#!/bin/sh
# Long-name distribution so libcluster can reach this node from peers
# and Nebulex's Replicated cache (L2) can fan writes via `pg`.
#
# 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 "git_gud@" 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 git_gud@${POD_IP}" >&2
export RELEASE_DISTRIBUTION=name
export RELEASE_NODE="git_gud@${POD_IP}"
else
echo "[env.sh] POD_IP is empty — falling back to local-only sname distribution" >&2
fi
778 B · text
5af55d9