Files
OmniRoute/scripts/check-permissions.sh
Andrianata Daud 6561548687 fix(docker): warn-only on /app/data permission check, remove exit 1 (#3036)
Integrated into release/v3.8.8. Docker /app/data permission check is now warn-only (no exit 1 crash-loop on first run) + UID hint uses $(id -u):$(id -g). The mcp-tools-43.svg part was already in the release. Thanks @wussh!
2026-06-01 08:12:19 -03:00

19 lines
745 B
Bash
Executable File

#!/bin/sh
set -e
# ── Memory limit override ──────────────────────────────────────────────
# If OMNIROUTE_MEMORY_MB is set, build NODE_OPTIONS dynamically so the
# user can tune heap size via environment without editing the Dockerfile.
if [ -n "$OMNIROUTE_MEMORY_MB" ]; then
export NODE_OPTIONS="${NODE_OPTIONS:-} --max-old-space-size=${OMNIROUTE_MEMORY_MB}"
fi
if [ -d "/app/data" ] && [ ! -w "/app/data" ]; then
echo "WARNING: /app/data is not writable by the current user (UID $(id -u))."
echo "Run this on the Docker host to fix:"
echo " sudo chown -R $(id -u):$(id -g) /app/data"
echo " chmod -R u+rwX ./data"
fi
exec "$@"