add deployment

This commit is contained in:
Aditya Siregar
2025-09-01 18:09:54 +07:00
parent 6d2fe8d6f7
commit 22374dbee1
9 changed files with 125 additions and 1 deletions
+21
View File
@@ -0,0 +1,21 @@
#!/bin/bash
APP_NAME="apskel-frontend"
PORT="8080"
echo "🔄 Pulling latest code..."
git pull
echo "🐳 Building Docker image..."
docker build -t apskel-frontend .
echo "🛑 Stopping and removing old container..."
docker stop $APP_NAME 2>/dev/null
docker rm $APP_NAME 2>/dev/null
echo "🚀 Running new container..."
docker run -d --name $APP_NAME \
-p 8080:$PORT \
$APP_NAME:latest
echo "✅ Deployment complete."