Add deployment script for automated sync and container rebuild
Creates deploy.sh script that: - Syncs files to node03 server using rsync - Rebuilds and restarts the Docker container - Shows deployment status and container health 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
This commit is contained in:
23
deploy.sh
Executable file
23
deploy.sh
Executable file
@@ -0,0 +1,23 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Deploy script for whale hunting game
|
||||
# Syncs files to node03 and rebuilds the Docker container
|
||||
|
||||
set -e # Exit on error
|
||||
|
||||
echo "🚢 Syncing files to node03..."
|
||||
rsync -avz --exclude 'node_modules' --exclude 'dist' --exclude '.git' --exclude '.DS_Store' \
|
||||
./ tho@node03.tricnet.de:/home/tho/whalehunting/
|
||||
|
||||
echo ""
|
||||
echo "🐳 Rebuilding and restarting Docker container..."
|
||||
ssh tho@node03.tricnet.de "cd /home/tho/whalehunting && docker-compose down && docker-compose up -d --build"
|
||||
|
||||
echo ""
|
||||
echo "✅ Deployment complete!"
|
||||
echo "🌐 Game available at: http://node03.tricnet.de:8880"
|
||||
|
||||
# Check container status
|
||||
echo ""
|
||||
echo "📊 Container status:"
|
||||
ssh tho@node03.tricnet.de "cd /home/tho/whalehunting && docker-compose ps"
|
||||
Reference in New Issue
Block a user