chore: upgrade app 3.5.3 -> 2026.1.5, redis 7.4-alpine -> 8.8-alpine
Some checks failed
cc-ci/testme cc-ci: failure

This commit is contained in:
autonomic-bot
2026-07-13 17:59:04 +00:00
parent c10c04c520
commit 0d7519e9ef
11 changed files with 254 additions and 208 deletions

24
migrate-uploads.sh Executable file
View File

@ -0,0 +1,24 @@
#!/bin/bash
# One-time, idempotent, NON-destructive migration of uploads + backups from a
# legacy bitnami discourse volume into the official image's /shared.
#
# Runs on every boot as a runit 1.d hook but no-ops after the first success
# (sentinel) and when there is no legacy volume mounted (fresh installs). It only
# ever COPIES from the read-only /legacy mount, so an interruption just re-copies
# on the next boot — there is no move/delete to leave the data half-migrated.
set -e
SENTINEL=/shared/.bitnami-uploads-migrated
[ -e "$SENTINEL" ] && exit 0
if [ -d /legacy/public/uploads ]; then
echo "[migrate-uploads] copying bitnami uploads/backups -> /shared"
mkdir -p /shared/uploads /shared/backups
cp -a /legacy/public/uploads/. /shared/uploads/ 2>/dev/null || true
cp -a /legacy/public/backups/. /shared/backups/ 2>/dev/null || true
# discourse runs as uid 1000; the official boot also chowns /shared, but be explicit
chown -R discourse:discourse /shared/uploads /shared/backups 2>/dev/null || true
echo "[migrate-uploads] done"
fi
touch "$SENTINEL"