One account per original author (nickname = name as signed on the old site, group 'Original site'), display-name driver 'museum' keeps the brackets; --replace re-imports threads without real replies. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01YDRjtmAiNpo5mK5N3d7QwZ
34 lines
1.1 KiB
Bash
Executable File
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 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 "$@"
|