REPORT; evidence: bench destroyed, R-655 read, demo-hp docmost before the night
gates / gates (push) Successful in 25s

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0159rPz1ZhFKsS53msqPYxtS
This commit is contained in:
2026-09-25 15:08:50 +02:00
parent 305f79c40f
commit 6576f28cc0
5 changed files with 139 additions and 6 deletions
@@ -0,0 +1,8 @@
hostname: upgrade-harness
purging CT 9401 from related configurations..
destroyed-9401
VMID Status Lock Name
9201 running demo-hp
9202 running demo-hp-scratch
local dir active 40453376 22746084 15620176 56.23%
nvme-scratch dir active 983379700 76161180 857191908 7.74%
@@ -0,0 +1,101 @@
# ghcr.io/seanmorley15/adventurelog-backend:v0.13.0 — entrypoint + cmd
ENTRYPOINT=["/code/entrypoint.sh"] CMD=["supervisord","-c","/etc/supervisor/conf.d/supervisord.conf"]
# /code/entrypoint.sh
7-wait_for_postgres
8-run_migrations
9-create_superuser_if_needed
10:run_download_countries
11-finalize_startup
12-
13-exec "$@"
# the management command
/code/worldtravel/management/commands/download-countries.py
/code/build_files.sh
/code/entrypoint.sh
/code/scripts:
entrypoint-common.sh
run-cron-job.sh
write-cron-env.sh
#!/bin/bash
set -euo pipefail
cd /code
source /code/scripts/entrypoint-common.sh
## /code/entrypoint.sh
## /code/scripts/entrypoint-common.sh
68:run_download_countries() {
69- if [[ "${SKIP_WORLD_DATA:-}" == "1" ]]; then
70- >&2 echo "SKIP_WORLD_DATA=1 — skipping download-countries"
71- return 0
72- fi
73-
74- >&2 echo "Running download-countries (first boot may take several minutes; ensure ~2GB RAM is available)..."
75- python manage.py download-countries
76- local download_exit=$?
77- if [[ "$download_exit" -eq 137 ]]; then
78- >&2 echo "WARNING: download-countries was interrupted (likely out of memory). Retry with more RAM or set SKIP_WORLD_DATA=1."
79- exit 1
80- elif [[ "$download_exit" -ne 0 ]]; then
81- >&2 echo "ERROR: download-countries failed."
82- exit 1
83- fi
84-}
85-
86-finalize_startup() {
87- if [[ -f /code/adventurelog.txt ]]; then
88- cat /code/adventurelog.txt
89- fi
90-
91- /code/scripts/write-cron-env.sh
92-}
# the command itself (options, cache, what it writes)
6:import ijson
17:COUNTRY_REGION_JSON_VERSION = settings.COUNTRY_REGION_JSON_VERSION
30: # Check if the flag already exists in storage
31: if default_storage.exists(flag_path):
32: print(f'Flag for {country_code} already exists')
45: def add_arguments(self, parser):
46: parser.add_argument('--force', action='store_true', help='Force download the countries+regions+states.json file')
47: parser.add_argument('--batch-size', type=int, default=500, help='Batch size for database operations')
92: force = options['force']
94: countries_json_path = f'countries+regions+states-{COUNTRY_REGION_JSON_VERSION}.json'
96: # Download or validate JSON file
97: if not default_storage.exists(countries_json_path) or force:
98: self.stdout.write('Downloading JSON file...')
99: if force and default_storage.exists(countries_json_path):
100: default_storage.delete(countries_json_path)
101: res = requests.get(f'https://raw.githubusercontent.com/dr5hn/countries-states-cities-database/{COUNTRY_REGION_JSON_VERSION}/json/countries%2Bstates%2Bcities.json')
103: default_storage.save(countries_json_path, ContentFile(res.content))
104: self.stdout.write(self.style.SUCCESS('JSON file downloaded successfully'))
106: self.stdout.write(self.style.ERROR('Error downloading JSON file'))
108: elif default_storage.size(countries_json_path) == 0:
109: self.stdout.write(self.style.ERROR('JSON file is empty'))
121: self.stdout.write('Step 1: Parsing JSON and storing in temporary database...')
122: self._parse_and_store_temp(countries_json_path, temp_conn)
138: def _parse_and_store_temp(self, json_path, temp_conn):
139: """Parse JSON once and store in temporary SQLite database"""
144: with default_storage.open(json_path, 'rb') as f:
145: parser = ijson.items(f, 'item')
# v0.12.1: 398:COUNTRY_REGION_JSON_VERSION = 'v3.1'
/code/entrypoint.sh:0
# v0.13.0: 470:COUNTRY_REGION_JSON_VERSION = 'v3.1'
/code/scripts/entrypoint-common.sh:3 /code/entrypoint.sh:0
# where the JSON is stored (default_storage root)
216:MEDIA_ROOT = BASE_DIR / 'media' # Must match NGINX root for media serving
227:STORAGES = {
237: STORAGES["default"] = {
# v0.12.1 entrypoint: download-countries?
77-# Sync the countries and world travel regions
78-# Sync the countries and world travel regions
79:python manage.py download-countries
80-if [ $? -eq 137 ]; then
81: >&2 echo "WARNING: The download-countries command was interrupted. This is likely due to lack of memory allocated to the container or the host. Please try again with more memory."
82- exit 1
83-fi
84-
85-cat /code/adventurelog.txt
86-
87-exec "$@"
# v0.12.1 command: same cache check?
93: countries_json_path = os.path.join(settings.MEDIA_ROOT, f'countries+regions+states-{COUNTRY_REGION_JSON_VERSION}.json')
@@ -0,0 +1,7 @@
demo-hp docmost: catalog {'docmost': 'docmost/docmost:0.96.0', 'docmost-postgres': 'postgres:16-alpine', 'docmost-redis': 'redis:7-alpine'} | pinned {'docmost': 'docmost/docmost:0.96.0', 'docmost-postgres': 'postgres:16-alpine', 'docmost-redis': 'redis:7-alpine'}
9cc829c nextcloud: after_load runs its own rescan after a load of kept data (09 decision 36, Part E)
app_update: None | backup window: {}
demo-hp docmost catalog: {'docmost': 'docmost/docmost:0.96.0', 'docmost-postgres': 'postgres:16-alpine', 'docmost-redis': 'redis:7-alpine'} | steps left: None | pinned {'docmost': 'docmost/docmost:0.96.0', 'docmost-postgres': 'postgres:16-alpine', 'docmost-redis': 'redis:7-alpine'}
badges: {'hu': [{'title': 'Ez az alkalmazás a legfrissebb elérhető változatot futtatja.', 'text': 'Naprakész'}], 'en': [{'title': 'This app is running the newest version available.', 'text': 'Up to date'}]}
demo-hp docmost catalog: {'docmost': 'docmost/docmost:0.96.0', 'docmost-postgres': 'postgres:18-alpine', 'docmost-redis': 'redis:7-alpine'} | steps left: 1
badges: {'hu': [{'title': 'Újabb változat érhető el ehhez az alkalmazáshoz. A frissítés indításához nyomd meg a Frissítés gombot.', 'text': 'Frissítés elérhető — ma'}], 'en': [{'title': 'A newer version of this app is available. Select the Update button to start it.', 'text': 'Update available — today'}]}
@@ -0,0 +1,10 @@
# demo-hp docmost BEFORE the night — read-only SELECTs, 2026-09-25T12:41:10Z
16
users=1
workspaces=1
spaces=1
pages=4
approx live rows=0
front door GET / -> 200
/dev/mapper/pve-vm--9201--disk--0 32G 960M 29G 4% /
/dev/mapper/pve-vm--9201--disk--1 69G 23G 43G 35% /var/lib/docker