Discourse
- RAM requirements: ~1.5 GB.
- CPU requirements: 1 core
- SSD requirements: ~20 GB. May be more over time
Accessible as forum.vcmi.eu
Admin access:
- Ivan Savenko
- AVS
- SXX
- Warmonger
Additional accounts can be given admin rights via admin panel. Or, if none are available - directly via server console (requires root access to server).
Configuration
- Located at
/var/discourse. - Configuration file is at
/var/discourse/containers/app.yml. The template lives inscripts/discourse/app.ymland is rendered from environment variables bysetup.sh. - For administration typical approach is
cd /var/discourse; ./launcher enter app. However most commands are also available in web UI.
References:
Setup
All operational scripts live in scripts/discourse/. Copy the directory to /root/discourse/ on the target server.
- Place certificates in
/root/certs/on the server (forum.vcmi.eu.pem,forum.vcmi.eu.key,cloudflare-client.crt). scp -r scripts/discourse root@new-server:/root/- On the server:
prepare.sh installs nginx + certs and runs the official Discourse install script (downloads Docker, sets up /var/discourse). setup.sh renders the templated app.yml, writes it to /var/discourse/containers/app.yml, and runs ./launcher rebuild app.
The bundled app.yml runs Discourse via the web.socketed.template.yml Unix socket and disables Discourse's own SSL templates — HTTPS is terminated by host nginx using the Cloudflare Origin cert.
Upgrade
./upgrade.sh runs ./launcher rebuild app. Causes ~5 minutes of downtime.
Alternatively can be done in the admin UI, but untested.
Migration
DNS cutover goes last to minimise visible downtime — the new instance is
fully restored and serving before users are pointed at it. (Discourse itself
knows its hostname from DISCOURSE_HOSTNAME in app.yml, not from DNS, so a
restore against the new container works before the A record moves.)
- On the old server:
./export.sh— produces/root/discourse-backup.tar.gz. - Set up Discourse on the new server (Setup steps above).
- Transfer the backup directly between servers using your workstation's SSH agent for auth:
Or, if agent forwarding is not available, route through the workstation:
scp -3 root@old:/root/discourse-backup.tar.gz root@new:/root/. - On the new server:
./import.sh /root/discourse-backup.tar.gz. - Switch the DNS A record for
forum.vcmi.euto the new server IP.