main #11
25
deploy.sh
25
deploy.sh
@ -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
|
||||||
|
Loading…
x
Reference in New Issue
Block a user