Forum integration: Flarum extension, local test stack, embedded comments

- forum/extension: oc:import command (archived comments -> one thread per
  machine) and embed styling
- forum/docker: local Flarum 2 test stack
- site: optional params.forum.url adds a Forum menu entry and shows the
  machine thread in the Comments tab

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01YDRjtmAiNpo5mK5N3d7QwZ
This commit is contained in:
2026-10-11 21:21:08 +02:00
co-authored by Claude Opus 5.5
parent 2b5c9df929
commit 32b735283e
17 changed files with 436 additions and 2 deletions
+33
View File
@@ -0,0 +1,33 @@
#!/bin/sh
# First start: install Flarum against the db service, enable the extensions the site relies on.
set -e
cd /var/www/flarum
if [ ! -f config.php ]; then
until php -r 'new PDO("mysql:host=db;dbname=flarum", "flarum", "flarum");' >/dev/null 2>&1; do sleep 2; done
cat > /tmp/install.yml <<Y
debug: true
baseUrl: ${FORUM_URL}
databaseConfiguration:
driver: mysql
host: db
port: 3306
database: flarum
username: flarum
password: flarum
prefix:
adminUser:
username: admin
password: ${ADMIN_PASSWORD}
email: admin@example.com
settings:
forum_title: Old-Computers.com forum
Y
php flarum install --file=/tmp/install.yml
fi
# the museum extension is mounted from the repository (forum/extension)
composer require --no-interaction "oc/flarum-museum:*@dev" >/dev/null 2>&1 || composer require --no-interaction "oc/flarum-museum:*@dev"
php flarum migrate
for ext in flarum-tags flarum-markdown flarum-embed oc-museum; do php flarum extension:enable "$ext" || true; done
php flarum cache:clear
chown -R www-data:www-data storage public/assets
exec docker-php-entrypoint "$@"