From 093a4e492e478dd5c3ec544806f2df507f8012cd Mon Sep 17 00:00:00 2001 From: mahmamdouh Date: Sun, 4 Jan 2026 16:28:26 +0100 Subject: [PATCH] update monitor --- deploy.sh | 21 +++++++++++++++++++++ restart_services.sh | 14 ++++++++++++++ 2 files changed, 35 insertions(+) create mode 100644 deploy.sh create mode 100644 restart_services.sh diff --git a/deploy.sh b/deploy.sh new file mode 100644 index 0000000..e2efc26 --- /dev/null +++ b/deploy.sh @@ -0,0 +1,21 @@ +#!/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." diff --git a/restart_services.sh b/restart_services.sh new file mode 100644 index 0000000..e280aec --- /dev/null +++ b/restart_services.sh @@ -0,0 +1,14 @@ +#!/bin/bash + +# Configuration +APP_DIR="/home/asf/testarena_backend" + +echo "Restarting services in $APP_DIR..." + +cd $APP_DIR || { echo "Directory $APP_DIR not found"; exit 1; } + +# Restart containers without rebuilding +echo "Restarting Docker containers..." +docker-compose restart + +echo "Services restarted successfully."