addd deply ent
This commit is contained in:
parent
486f45bb92
commit
8992328c1b
21
deployment.sh
Normal file
21
deployment.sh
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
APP_NAME="meti-frontend"
|
||||||
|
PORT="3000"
|
||||||
|
|
||||||
|
echo "🔄 Pulling latest code..."
|
||||||
|
git pull
|
||||||
|
|
||||||
|
echo "🐳 Building Docker image..."
|
||||||
|
docker build -t $APP_NAME .
|
||||||
|
|
||||||
|
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 4002:$PORT \
|
||||||
|
$APP_NAME:latest
|
||||||
|
|
||||||
|
echo "✅ Deployment complete."
|
||||||
Loading…
x
Reference in New Issue
Block a user