From 89b9cefb8c15d11eab7edc55ea52451f30e61c70 Mon Sep 17 00:00:00 2001 From: Andreas Dueren Date: Fri, 20 Jun 2025 12:27:23 -0600 Subject: [PATCH] Fix Erlang runtime paths with proper symlinks --- start.sh | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/start.sh b/start.sh index e616edf..a7f30a5 100644 --- a/start.sh +++ b/start.sh @@ -52,14 +52,20 @@ if [[ ! -f "/app/data/root_credentials" ]]; then chmod 600 /app/data/root_credentials fi -# Create Erlang symlinks to fix path issues -echo "==> Setting up Erlang runtime symlinks" -mkdir -p /app/data/keila/erts-14.2.5/bin +# Create complete Erlang runtime structure +echo "==> Setting up Erlang runtime" ERTS_DIR=$(find /usr/local/lib/erlang -name "erts-*" -type d | head -1) if [[ -n "$ERTS_DIR" ]]; then - echo "Linking Erlang binaries from: $ERTS_DIR" - cp -r "$ERTS_DIR"/bin/* /app/data/keila/erts-14.2.5/bin/ + echo "Setting up Erlang from: $ERTS_DIR" + # Create the exact structure Keila expects + rm -rf /app/data/keila/erts-14.2.5 + cp -r "$ERTS_DIR" /app/data/keila/erts-14.2.5 chown -R cloudron:cloudron /app/data/keila/erts-14.2.5 + + # Also create symlink from the releases directory + cd /app/data/keila/releases/0.14.11 + ln -sf ../../erts-14.2.5 ./erts-14.2.5 + cd /app/code fi echo "==> Running database migrations"