Files
yann64andClaude Opus 5.5 b1301dcafb Forum: spam filter fof/anti-spam in the image and server bundle
README: update procedure that keeps the Synology ACLs, and how to repair them.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01YDRjtmAiNpo5mK5N3d7QwZ
2026-10-13 17:38:32 +02:00

34 lines
1.1 KiB
Bash
Executable File

#!/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-nicknames flarum-embed flarum-flags flarum-approval fof-anti-spam 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 "$@"