add deploy.sh and docker-compose

This commit is contained in:
2025-11-08 22:43:25 +07:00
parent cef697877a
commit 1d54765b32
2 changed files with 28 additions and 0 deletions

17
deploy.sh Normal file
View File

@@ -0,0 +1,17 @@
#!/bin/bash
set -e
cd /home/dilanka/my_website
echo "==> Pulling latest code..."
git pull origin main
echo "==> Rebuilding Docker image..."
docker compose down
docker compose build --no-cache
docker compose up -d
echo "==> Cleanup..."
docker system prune -f
echo "✅ Deploy complete!"