Add update_and_restart.sh script
This commit is contained in:
parent
81369b50eb
commit
d161577caa
1 changed files with 18 additions and 0 deletions
18
update_and_restart.sh
Normal file
18
update_and_restart.sh
Normal file
|
|
@ -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
|
||||||
Loading…
Reference in a new issue