main
official discourse/discourse:2026.9.0-latest (all-in-one web+sidekiq) + pgvector/pgvector:pg16 + redis:7. External DB/redis (DISCOURSE_DB_SOCKET='' forces TCP), MIGRATE_ON_BOOT=1, /shared volume for uploads+backups. Restore-fidelity test of the bedford-ma backup (schema v20250709051949).
discourse-spike
Throwaway official-image Discourse stack to spike-test restoring the bedford-ma backup
(bedford-ma-community-forums-2026-08-30-…-v20250709051949.tar.gz, ~Discourse 3.5.x) on
Coolify → worker2. GREEN = migrate bedfordma to Coolify (compose); RED = official launcher
install on a father VM.
Stack
web—discourse/discourse:2026.9.0-latest(launcher-built web_only image: nginx + unicorn/pitchfork + supervised sidekiq in one container)db—pgvector/pgvector:pg16(Discourse schema requires thevectorextension)redis—redis:7
Deploy (via @shrug/coolify on shrug-coolify-root → worker2)
createComposeApplicationfrom this private repo (build_pack=dockercompose)upsertApplicationEnvs— set the vars from.env.example(real values)setComposeDomains—{"web": "https://<temp-domain>:80"}(temp sslip.io/nip.io)deploy(instantDeploy) → pollgetDeploymenttofinished- First-boot:
MIGRATE_ON_BOOT=1runsdb:migrateon the empty DB → clean Discourse
Restore the backup
Backup file must sit in the container at /shared/backups/default/.
# on worker2 (via a worker2 cfgmgmt/exec model): copy backup into the web container's /shared
docker cp <backup>.tar.gz $(docker ps -qf name=web):/shared/backups/default/
docker exec <web> discourse enable_restore
docker exec <web> discourse restore <backup>.tar.gz
docker exec <web> discourse disable_restore
# hostname differs from bedfordma.today -> remap + rebake:
docker exec <web> discourse remap bedfordma.today <temp-domain>
docker exec <web> discourse rake posts:rebake
Verify (GREEN criteria)
- Web loads at the temp domain; can log in
- Posts / users / categories / uploads all present (uploads render, not broken links)
discourse doctorclean-ish
Known risks to watch on first deploy
- :443 binding — the image has SSL templates baked (DISABLE_LETSENCRYPT=1). We only expose :80 and terminate TLS at Coolify's proxy; confirm the container doesn't crash trying :443.
- Backup dir — restore only sees
/shared/backups/default/(exact path). - DB superuser — restore drops/recreates schema + CREATE EXTENSION;
discourserole is POSTGRES_USER (superuser) so that's covered.
Description