PPT-Springboot / start.sh
shashidharak99's picture
Update start.sh
6cfc6bc verified
raw
history blame contribute delete
540 Bytes
#!/bin/bash
cd /app
echo "Cloning repository..."
git clone $REPO_URL project
cd project
echo "Installing dependencies..."
npm install
echo "Building project..."
npm run build
rm -rf /var/www/html/*
# Vite
if [ -d "dist" ]; then
cp -r dist/* /var/www/html/
fi
# CRA
if [ -d "build" ]; then
cp -r build/* /var/www/html/
fi
echo "Starting nginx..."
service nginx start
echo "Starting cron..."
cron
# Create log file if not exists
touch /var/log/cron.log
echo "Container started successfully"
tail -f /var/log/cron.log