Files
monitor/deploy.sh
2026-01-04 16:28:26 +01:00

22 lines
524 B
Bash

#!/bin/bash
# Configuration
APP_DIR="/home/asf/testarena_backend"
echo "Starting deployment in $APP_DIR..."
cd $APP_DIR || { echo "Directory $APP_DIR not found"; exit 1; }
# Pull latest changes (assuming it's a git repo)
if [ -d ".git" ]; then
echo "Pulling latest changes from git..."
git pull origin main || git pull origin master
fi
# Build and restart containers
echo "Building and restarting Docker containers..."
docker-compose down
docker-compose up --build -d
echo "Deployment completed successfully."