#!/bin/bash # Nginx Deployment Script fΓΌr SSL/Reverse Proxy echo "πŸ”§ Deploying Nginx configuration..." # 1. Copy configuration to sites-available sudo cp nginx-collabrix.conf /etc/nginx/sites-available/collabrix.conf # 2. Create symlink in sites-enabled sudo ln -sf /etc/nginx/sites-available/collabrix.conf /etc/nginx/sites-enabled/ # 3. Test Nginx configuration echo "πŸ“‹ Testing Nginx configuration..." sudo nginx -t if [ $? -eq 0 ]; then echo "βœ… Nginx configuration is valid" # 4. Reload Nginx echo "πŸ”„ Reloading Nginx..." sudo systemctl reload nginx echo "βœ… Nginx successfully reloaded" echo "" echo "🌐 Your application is now available at:" echo " https://collabrix.apex-project.de" echo "" echo "πŸ“ Next steps:" echo " 1. Restart backend: cd backend && uvicorn app.main:app --host 0.0.0.0 --port 8000" echo " 2. Restart frontend: cd frontend && npm run dev" echo " 3. Test HTTPS access in browser" else echo "❌ Nginx configuration test failed" echo "Please check the error messages above" exit 1 fi