Fix deploy.sh to also sync web_template to server

base.js and base.css were returning 404 because /var/www/html/web_template
did not exist on the server. Now rsyncs /root/code/web_template/ to
/var/www/html/web_template/ before deploying the app.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-03-17 23:36:55 -04:00
parent 8bb43c14db
commit 5545328e53

View File

@@ -3,13 +3,17 @@ set -e
echo "Deploying tinker_tickets to web server..." echo "Deploying tinker_tickets to web server..."
# Deploy web_template (shared UI framework)
echo "Syncing web_template to web server..."
rsync -avz --delete --exclude='.git' --exclude='node' --exclude='php' --exclude='python' --exclude='README.md' --exclude='Claude.md' /root/code/web_template/ root@10.10.10.45:/var/www/html/web_template/
# Deploy to web server # Deploy to web server
echo "Syncing to web server (10.10.10.45)..." echo "Syncing to web server (10.10.10.45)..."
rsync -avz --delete --exclude='.git' --exclude='deploy.sh' --exclude='.env' ./ root@10.10.10.45:/var/www/html/tinkertickets/ rsync -avz --delete --exclude='.git' --exclude='deploy.sh' --exclude='.env' ./ root@10.10.10.45:/var/www/html/tinkertickets/
# Set proper permissions on the web server # Set proper permissions on the web server
echo "Setting proper file permissions..." echo "Setting proper file permissions..."
ssh root@10.10.10.45 "chown -R www-data:www-data /var/www/html/tinkertickets && find /var/www/html/tinkertickets -type f -exec chmod 644 {} \; && find /var/www/html/tinkertickets -type d -exec chmod 755 {} \;" ssh root@10.10.10.45 "chown -R www-data:www-data /var/www/html/web_template /var/www/html/tinkertickets && find /var/www/html/web_template /var/www/html/tinkertickets -type f -exec chmod 644 {} \; && find /var/www/html/web_template /var/www/html/tinkertickets -type d -exec chmod 755 {} \;"
echo "Deployment to web server complete!" echo "Deployment to web server complete!"
echo "Don't forget to commit and push your changes via VS Code when ready." echo "Don't forget to commit and push your changes via VS Code when ready."