Spaces:
Sleeping
Sleeping
File size: 540 Bytes
2c4970c 6cfc6bc 2c4970c 6cfc6bc 2c4970c 6cfc6bc 2c4970c | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 | #!/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 |