main #11

Merged
mstoeck3 merged 66 commits from main into forensic-ai 2025-08-11 12:02:56 +00:00
Showing only changes of commit fd721ce930 - Show all commits

View File

@ -134,6 +134,31 @@ echo "📋 Copying application files..."
cp -r dist/. "$WEBROOT/" cp -r dist/. "$WEBROOT/"
echo "✅ Application files copied ($(du -sh dist | cut -f1))" echo "✅ Application files copied ($(du -sh dist | cut -f1))"
# Copy package.json for runtime dependencies
echo "📦 Setting up runtime dependencies..."
cp package.json "$WEBROOT/"
echo "✅ package.json copied"
# Install production dependencies in webroot
echo "📦 Installing runtime dependencies..."
cd "$WEBROOT"
if command -v npm &> /dev/null; then
npm install --production
echo "✅ Runtime dependencies installed"
else
sudo -u "$ORIGINAL_USER" bash -c "
cd '$WEBROOT'
export NVM_DIR='$ORIGINAL_HOME/.nvm'
[ -s '\$NVM_DIR/nvm.sh' ] && source '\$NVM_DIR/nvm.sh'
[ -s '$ORIGINAL_HOME/.bashrc' ] && source '$ORIGINAL_HOME/.bashrc'
npm install --production
"
echo "✅ Runtime dependencies installed via nvm"
fi
# Return to source directory
cd - > /dev/null
# Copy essential data files # Copy essential data files
echo "🗂️ Setting up data files..." echo "🗂️ Setting up data files..."
if [ -f "src/data/tools.yaml" ]; then if [ -f "src/data/tools.yaml" ]; then