From 5742e0633202d4f57fff8ad80a9e5e593346a9ba Mon Sep 17 00:00:00 2001 From: Sergei Poljanski Date: Tue, 17 Nov 2026 07:56:10 +0400 Subject: [PATCH] nixos: ops-data.sh starts no apps on a rehearsal host A restored /opt//.env holds production credentials: vhpbot would log in as the production bot, asxpio-monitor would probe the internet, the apps could send mail. On a rehearsal host the script now stops before starting them; they are started by hand, sanitized. Assisted-by: Claude:opus-5-5 --- nixos/migration/ops-data.sh | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/nixos/migration/ops-data.sh b/nixos/migration/ops-data.sh index 557f1cf..c5e809a 100755 --- a/nixos/migration/ops-data.sh +++ b/nixos/migration/ops-data.sh @@ -90,6 +90,14 @@ forgejo-admin regenerate hooks forgejo-admin regenerate keys echo "== App stacks: images again (Docker's image store does not carry over)" +case "$(hostname)" in + rehearsal-*) + # Restored .env files hold production credentials: vhpbot would log + # in as the production bot, asxpio-monitor probe the internet, the + # apps send mail. Start them by hand, sanitized (MIGRATION.md rules). + echo " rehearsal host: apps NOT started" + exit 0 ;; +esac for app in asxpio datacenterbingo blog czsk vhpbot-prod vhpbot-dev; do [ -f "/opt/$app/docker-compose.yml" ] || continue echo " $app"