diff --git a/start_server.sh b/start_server.sh index 810b152c..1f0834e3 100755 --- a/start_server.sh +++ b/start_server.sh @@ -15,9 +15,6 @@ if [ -f "$CONFIG_PATH" ]; then export $(grep -v '^#' "$CONFIG_PATH" | xargs) fi -# Add common Mac paths for npm/node -export PATH="/opt/homebrew/bin:/usr/local/bin:$PATH" - echo "🚀 Starting TFM aInventory Stack with Dual Proxy..." # 1. Kill potentially hanging processes @@ -38,7 +35,7 @@ echo "📦 Updating Python dependencies..." pip install -q -r backend/requirements.txt # 4. Get Local IP and set environment variables -LOCAL_IP=$(ipconfig getifaddr en0 || ipconfig getifaddr en1 || echo "localhost") +LOCAL_IP=$(hostname -I | awk '{print $1}' || echo "localhost") export ALLOWED_ORIGINS="http://localhost:$FRONTEND_PORT,http://localhost:$BACKEND_PORT,https://localhost:$FRONTEND_SSL_PORT,https://localhost:$BACKEND_SSL_PORT,https://$LOCAL_IP:$FRONTEND_SSL_PORT,https://$LOCAL_IP:$BACKEND_SSL_PORT" export JWT_SECRET_KEY="${JWT_SECRET_KEY:-ephemeral-dev-key-$(date +%s)}" export DATA_DIR="$(cd "$(dirname "$0")" && pwd)/data"