add watchtower

This commit is contained in:
2025-10-25 13:27:43 +00:00
parent 905fa852a5
commit 57f4fbe9f3
15 changed files with 305 additions and 258 deletions

18
main.sh
View File

@@ -210,6 +210,15 @@ start_services() {
print_error "failed to start Caddy!"
exit 1
fi
echo "Starting watchtower..."
$DOCKER_COMPOSE_COMMAND -f ./watchtower/docker-compose.yml up -d
if [ $? -eq 0 ]; then
print_success "Watchtower started successfully."
else
print_error "failed to start Watchtower!"
exit 1
fi
}
stop_services() {
@@ -347,6 +356,15 @@ stop_services() {
print_error "failed to stop Caddy!"
exit 1
fi
echo "Stopping watchtower..."
$DOCKER_COMPOSE_COMMAND -f ./watchtower/docker-compose.yml down
if [ $? -eq 0 ]; then
print_success "Watchtower stopped successfully."
else
print_error "failed to stop Watchtower!"
exit 1
fi
}
if [ $# -lt 1 ]; then