Fixes from the second Supermarket run: database versions, health host

The rerun found Supermarket needs PostgreSQL 18 while the Core runs 17.6,
which nothing had shown. The skill now gives the version and says to
check the app's; coreapp status shows the Core's PostgreSQL/MariaDB
version. Deploy's health check sends the app's Host, as traefik does; a
same-version deploy says so. The skill covers making the owner at
startup, building settings in the app's config loader, and checking mail.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-12-03 18:50:23 -07:00
co-authored by Claude Opus 5.5
parent dca8837487
commit b178b6964e
5 changed files with 78 additions and 13 deletions
+11 -2
View File
@@ -874,7 +874,11 @@ def install_app(m, p, folder, origin, addon_ok, recreate):
compose_up(m, log)
wait_until_answering(m, p)
else:
say(f"Updating {name} to {m['version']}...")
before = service_value(f"{APPS}/{name}/.env", "IMAGE_VERSION")
if before == m["version"]:
say(f"Updating {name} ({m['version']} again{', in a new container' if recreate else ''})...")
else:
say(f"Updating {name} to {m['version']}...")
log = log_path(name, "update")
# On the apps' filesystem: /tmp may be in memory, and /data's copy
# is a reflink, which only works within a filesystem
@@ -1144,13 +1148,18 @@ def remove_old_images(m):
def wait_until_answering(m, p):
name = m["name"]
url = f"http://{p['address']}:{m['port']}{m['health']}"
# As traefik sends it, so apps that check the host name answer as they
# will to people
headers = {"Host": f"{name}.{p['domain']}", "X-Forwarded-Proto": "https",
"X-Forwarded-Host": f"{name}.{p['domain']}"}
say(f"Waiting for it to answer at {url}...")
for _ in range(30):
state = run(["docker", "inspect", "-f", "{{.State.Status}}", name]).stdout.strip()
if state not in ("running", "created", "restarting"):
break
try:
with urllib.request.urlopen(url, timeout=2) as r:
with urllib.request.urlopen(urllib.request.Request(url, headers=headers),
timeout=2) as r:
if 200 <= r.status < 400:
return
except urllib.error.HTTPError as e: