Fix COOKIE issue by setting RELEASE_COOKIE environment variable
- Remove dummy COOKIE file creation (doesn't work in Nix store) - Set RELEASE_COOKIE env var in wrapper script instead - This follows NixOS best practices for Elixir releases
This commit is contained in:
parent
8cbad5c849
commit
36e590becb
@ -12,15 +12,13 @@ beamPackages.mixRelease rec {
|
|||||||
|
|
||||||
# Disable distributed Erlang to avoid COOKIE requirement
|
# Disable distributed Erlang to avoid COOKIE requirement
|
||||||
postInstall = ''
|
postInstall = ''
|
||||||
# Create a dummy COOKIE file to satisfy the release boot script
|
# Create wrapper script that sets proper environment including COOKIE
|
||||||
echo "dummy_cookie" > $out/releases/COOKIE
|
|
||||||
|
|
||||||
# Create wrapper script that sets proper environment
|
|
||||||
mv $out/bin/systant $out/bin/.systant-wrapped
|
mv $out/bin/systant $out/bin/.systant-wrapped
|
||||||
cat > $out/bin/systant << EOF
|
cat > $out/bin/systant << EOF
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
export RELEASE_DISTRIBUTION=none
|
export RELEASE_DISTRIBUTION=none
|
||||||
export RELEASE_NODE=nonode@nohost
|
export RELEASE_NODE=nonode@nohost
|
||||||
|
export RELEASE_COOKIE=dummy_cookie_for_single_node
|
||||||
exec "$out/bin/.systant-wrapped" "\$@"
|
exec "$out/bin/.systant-wrapped" "\$@"
|
||||||
EOF
|
EOF
|
||||||
chmod +x $out/bin/systant
|
chmod +x $out/bin/systant
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user