neiam
/diogramos
diogramos
public · Issues · Pulls · Labels · Forks · Compare · Actions success · Badges · Packages
⭐
Log in to mark this repository.
oops
7faf5f7 · gmorell · 2026-04-28 01:41
Files changed
added
rel/env.sh.eex
+19
−0
@@ -0,0 +1,19 @@
| 1 | +#!/bin/sh | |
| 2 | + | |
| 3 | +# Long-name distribution so libcluster can reach this node from peers | |
| 4 | +# and Horde can sync the registry across the cluster. | |
| 5 | +# | |
| 6 | +# POD_IP is injected by the deployment from status.podIP. RELEASE_COOKIE | |
| 7 | +# comes from the elixir-args secret so every replica agrees on the | |
| 8 | +# Erlang cookie. | |
| 9 | +# | |
| 10 | +# Only enable name-distribution when POD_IP is actually populated — | |
| 11 | +# otherwise RELEASE_NODE becomes "diogramos@" and the BEAM aborts | |
| 12 | +# before Logger attaches, producing only a generic init crash. | |
| 13 | +if [ -n "${POD_IP}" ]; then | |
| 14 | + echo "[env.sh] starting with name distribution as diogramos@${POD_IP}" >&2 | |
| 15 | + export RELEASE_DISTRIBUTION=name | |
| 16 | + export RELEASE_NODE="diogramos@${POD_IP}" | |
| 17 | +else | |
| 18 | + echo "[env.sh] POD_IP is empty — falling back to local-only sname distribution" >&2 | |
| 19 | +fi |
Parents: d79f598