-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Update app.blade.php to handle production assets correctly - Fix Input component import in BarriersTab.jsx - Configure vite.config.js for production - Add deployment script for automating prod updates
- Loading branch information
Showing
4 changed files
with
65 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
#!/bin/bash | ||
# Deploy script for Zephyrus | ||
|
||
# Exit on error | ||
set -e | ||
|
||
echo "Starting deployment process..." | ||
|
||
# Switch to the project directory | ||
cd "$(dirname "$0")" | ||
|
||
echo "Building assets..." | ||
# Build assets | ||
NODE_ENV=production npm run build | ||
|
||
echo "Syncing to production..." | ||
# Sync to production (excluding node_modules, .git, etc) | ||
sudo rsync -av --exclude 'node_modules' \ | ||
--exclude '.git' \ | ||
--exclude '.env' \ | ||
--exclude 'storage/logs/*' \ | ||
--exclude 'storage/framework/cache/*' \ | ||
--exclude '.github' \ | ||
--exclude 'tests' \ | ||
--exclude 'deploy.sh' \ | ||
/home/acumenus/GitHub/Zephyrus/ /var/www/Zephyrus/ | ||
|
||
echo "Setting permissions..." | ||
# Set proper permissions | ||
sudo chown -R www-data:www-data /var/www/Zephyrus/storage | ||
sudo chown -R www-data:www-data /var/www/Zephyrus/bootstrap/cache | ||
sudo chown -R www-data:www-data /var/www/Zephyrus/public/build | ||
|
||
echo "Clearing Laravel caches..." | ||
# Clear Laravel caches | ||
cd /var/www/Zephyrus | ||
php artisan cache:clear | ||
php artisan view:clear | ||
php artisan config:clear | ||
php artisan route:clear | ||
|
||
echo "Restarting Apache..." | ||
# Restart Apache | ||
sudo systemctl restart apache2 | ||
|
||
echo "Deployment completed successfully!" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters