Copy complete /usr/local and fix all Erlang paths
This commit is contained in:
@ -6,12 +6,9 @@ RUN apt-get update && apt-get install -y \
|
||||
supervisor \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
# Copy entire Keila app and complete Erlang runtime from official image
|
||||
# Copy entire Keila app and ALL Erlang-related files from official image
|
||||
COPY --from=pentacent/keila:0.14 /opt/app /app/pkg
|
||||
COPY --from=pentacent/keila:0.14 /usr/local/lib/erlang /usr/local/lib/erlang
|
||||
COPY --from=pentacent/keila:0.14 /usr/local/bin/erl /usr/local/bin/erl
|
||||
COPY --from=pentacent/keila:0.14 /usr/local/bin/erlc /usr/local/bin/erlc
|
||||
COPY --from=pentacent/keila:0.14 /usr/local/bin/escript /usr/local/bin/escript
|
||||
COPY --from=pentacent/keila:0.14 /usr/local /usr/local
|
||||
|
||||
# Copy configuration files
|
||||
COPY start.sh /app/code/start.sh
|
||||
|
18
start.sh
18
start.sh
@ -52,20 +52,26 @@ if [[ ! -f "/app/data/root_credentials" ]]; then
|
||||
chmod 600 /app/data/root_credentials
|
||||
fi
|
||||
|
||||
# Create complete Erlang runtime structure
|
||||
# Create complete Erlang runtime structure to fix paths
|
||||
echo "==> Setting up Erlang runtime"
|
||||
ERTS_DIR=$(find /usr/local/lib/erlang -name "erts-*" -type d | head -1)
|
||||
if [[ -n "$ERTS_DIR" ]]; then
|
||||
echo "Setting up Erlang from: $ERTS_DIR"
|
||||
# Create the exact structure Keila expects
|
||||
|
||||
# Create the exact structure Keila expects at both possible locations
|
||||
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
|
||||
# Create symlink in the releases directory for relative path resolution
|
||||
mkdir -p /app/data/keila/releases/0.14.11/erts-14.2.5
|
||||
rm -rf /app/data/keila/releases/0.14.11/erts-14.2.5
|
||||
ln -sf ../../../erts-14.2.5 /app/data/keila/releases/0.14.11/erts-14.2.5
|
||||
|
||||
# Also ensure the bin directory is accessible
|
||||
ln -sf /usr/local/bin/erl /app/data/keila/erts-14.2.5/bin/dyn_erl
|
||||
|
||||
echo "Created Erlang symlinks for path resolution"
|
||||
fi
|
||||
|
||||
echo "==> Running database migrations"
|
||||
|
Reference in New Issue
Block a user