Copy Erlang binaries to expected erts directory
This commit is contained in:
@ -15,11 +15,12 @@ COPY --from=pentacent/keila:0.14 /usr/local/bin/escript /usr/local/bin/escript
|
|||||||
|
|
||||||
# Copy configuration files
|
# Copy configuration files
|
||||||
COPY start.sh /app/code/start.sh
|
COPY start.sh /app/code/start.sh
|
||||||
|
COPY keila-wrapper.sh /app/code/keila-wrapper.sh
|
||||||
COPY supervisor/ /etc/supervisor/conf.d/
|
COPY supervisor/ /etc/supervisor/conf.d/
|
||||||
COPY nginx.conf /etc/nginx/sites-available/default
|
COPY nginx.conf /etc/nginx/sites-available/default
|
||||||
|
|
||||||
# Set permissions
|
# Set permissions
|
||||||
RUN chmod +x /app/code/start.sh && \
|
RUN chmod +x /app/code/start.sh /app/code/keila-wrapper.sh && \
|
||||||
chown -R cloudron:cloudron /app/code /app/pkg
|
chown -R cloudron:cloudron /app/code /app/pkg
|
||||||
|
|
||||||
WORKDIR /app/code
|
WORKDIR /app/code
|
||||||
|
17
keila-wrapper.sh
Normal file
17
keila-wrapper.sh
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
# Keila wrapper script that sets up proper Erlang runtime
|
||||||
|
|
||||||
|
# Set up environment for Keila
|
||||||
|
export MIX_ENV=prod
|
||||||
|
export ERL_LIBS=/usr/local/lib/erlang/lib
|
||||||
|
|
||||||
|
# Use system Erlang instead of the embedded one
|
||||||
|
export PATH="/usr/local/bin:$PATH"
|
||||||
|
|
||||||
|
# Run Keila with system Erlang
|
||||||
|
exec /usr/local/bin/erl -boot_var ERTS_LIB_DIR /usr/local/lib/erlang \
|
||||||
|
-boot /app/data/keila/releases/0.14.11/start \
|
||||||
|
-config /app/data/keila/releases/0.14.11/sys.config \
|
||||||
|
-args_file /app/data/keila/releases/0.14.11/vm.args \
|
||||||
|
-pa /app/data/keila/lib/*/ebin \
|
||||||
|
"$@"
|
12
start.sh
12
start.sh
@ -52,14 +52,14 @@ if [[ ! -f "/app/data/root_credentials" ]]; then
|
|||||||
chmod 600 /app/data/root_credentials
|
chmod 600 /app/data/root_credentials
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Fix Erlang runtime path for Keila release
|
# Create Erlang symlinks to fix path issues
|
||||||
if [[ ! -d "/app/data/keila/erts-14.2.5" ]]; then
|
echo "==> Setting up Erlang runtime symlinks"
|
||||||
echo "==> Setting up Erlang runtime symlink"
|
mkdir -p /app/data/keila/erts-14.2.5/bin
|
||||||
# Find the actual erts directory in the system Erlang installation
|
|
||||||
ERTS_DIR=$(find /usr/local/lib/erlang -name "erts-*" -type d | head -1)
|
ERTS_DIR=$(find /usr/local/lib/erlang -name "erts-*" -type d | head -1)
|
||||||
if [[ -n "$ERTS_DIR" ]]; then
|
if [[ -n "$ERTS_DIR" ]]; then
|
||||||
ln -sf "$ERTS_DIR" /app/data/keila/erts-14.2.5
|
echo "Linking Erlang binaries from: $ERTS_DIR"
|
||||||
fi
|
cp -r "$ERTS_DIR"/bin/* /app/data/keila/erts-14.2.5/bin/
|
||||||
|
chown -R cloudron:cloudron /app/data/keila/erts-14.2.5
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo "==> Running database migrations"
|
echo "==> Running database migrations"
|
||||||
|
Reference in New Issue
Block a user