From d161577caa4149a8bab3f252cfa13a63d372413a Mon Sep 17 00:00:00 2001 From: KV-Tube Deployer Date: Sat, 10 Jan 2026 14:53:52 +0700 Subject: [PATCH] Add update_and_restart.sh script --- update_and_restart.sh | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 update_and_restart.sh diff --git a/update_and_restart.sh b/update_and_restart.sh new file mode 100644 index 0000000..85f771d --- /dev/null +++ b/update_and_restart.sh @@ -0,0 +1,18 @@ +#!/bin/bash + +# KV-Tube Updater Script +# This script pulls the latest code and Docker images, then restarts the service. + +echo "--- 1. Pulling latest code changes... ---" +git pull origin main + +echo "--- 2. Pulling latest Docker image (v2.0)... ---" +docker-compose pull + +echo "--- 3. Restarting service with new configuration... ---" +# We down it first to ensure port bindings (5001 -> 5000) are updated +docker-compose down +docker-compose up -d --force-recreate + +echo "--- Done! Checking logs... ---" +docker-compose logs --tail=20 -f kv-tube