Skip to content

About

GPL v2 tooling for disposable phpBB test boards, extension fixtures and styles

Topics

Resources

Contributing

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

38 Commits

Folders and files

Repository files navigation

seed-forum

Tests

Set up disposable local phpBB boards, 3.3.x or 4.0 (master), on SQLite, MySQL, MariaDB, PostgreSQL or MSSQL, with test fixtures, extension checkouts and optional styles. Configuration is stored in YAML.

Only use this tooling with disposable boards. --reset deletes the board's configuration, database and cached state before reinstalling. The installer and fixture users have public test credentials. Keep boards local, not internet-facing.

Features

  • Download phpBB when the board directory is missing or empty: the 3.3.x release with SHA-256 verification, or phpBB 4.0 from the master branch through git (board.phpbb_branch: master), or from an open phpBB pull request (board.phpbb_pull_request).
  • Install on SQLite, or on MySQL, MariaDB, PostgreSQL or MSSQL in a fresh Docker container that only listens on 127.0.0.1 (board.database).
  • Bind-mount local extensions and enable or disable them through phpBB's CLI.
  • Seed standard forum fixtures and optional Knowledgebase fixtures.
  • Build a board from a real board's MySQL/MariaDB dump instead, in a disposable local container, with mail and the real board's extensions switched off.
  • Copy and install local styles, with an optional default style.
  • Create or update an optional nginx site, with validation and rollback.
  • Run mount, unmount, seed, style and cache operations without resetting the database.
  • Validate configuration and preview operations with --dry-run.

Requirements

  • Linux with Bash, bind-mount support and mountpoint (util-linux).
  • Python 3.9 or newer with PyYAML.
  • PHP CLI compatible with the board, including SQLite support (PHP 8.2 or newer for phpBB 4.0), and the mysqli or pgsql extension for MySQL, MariaDB or PostgreSQL boards (mysqli also for boards built from a dump).
  • jq for reset operations, sqlite3 for SQLite boards, plus curl, unzip and sha256sum for 3.3 boards or git and tar for 4.0 boards.
  • Docker for boards on any database but SQLite, and for boards built from a dump (board.import). MSSQL boards also run PHP in a container built from docker/php-drivers/, because PHP packages for Linux hosts don't include the MSSQL driver; starting one accepts Microsoft's SQL Server Developer licence.
  • sudo access for mounts and permission repairs; the web group is www-data.
  • nginx and PHP-FPM only when using automatic nginx site setup.

Other Linux setups may need changes to the permission or web-server settings. This is local development tooling, not a production deployment tool.

Installation

git clone https://github.com/phpbbmodders/seed-forum.git
cd seed-forum

Install the requirements using your system's package manager. For example, Debian and Ubuntu provide PyYAML as python3-yaml.

Quick Start

Create config/local.yml with a minimal core-only board configuration:

board:
  root: /tmp/seed-forum-board
  server_name: localhost
  server_port: '8093'
  seeds: []
extensions: {}
styles: {}

Choose a board directory reserved for disposable testing. Validate the configuration and inspect the plan before resetting:

bin/reset-board.sh --validate
bin/reset-board.sh --reset --dry-run

To carry out the destructive installation:

bin/reset-board.sh --reset

This example installs no extensions or fixtures and does not configure a web server. To add standard fixtures, set board.seeds to [bin/seed-standard-fixtures.php]. The configured port determines board URLs; it does not start a server unless nginx site setup is configured.

config/local.yml is ignored by Git. For an extension-enabled configuration, start with config/local.yml.example and replace its machine-specific paths. Running the command without an operation prints help.

Documentation

The usage guide covers configuration, extension selection, styles, nginx, fixtures, seed protection, mount records and all command options.

For local regression tests:

python3 -m unittest discover -s tests -v

Contributing

Contributions are welcome!

  • Bug reports: Open an issue.
  • Everything else (questions, feature requests, ideas, general discussion): Use Discussions.
  • Pull requests are welcome for bug fixes or discussed features.

Acknowledgments

  • Code, testing and documentation assisted by Claude and Codex.
  • Built around phpBB's CLI installer and forum APIs.

License

This project is licensed under the GNU General Public License v2.0.

See LICENSE for more information.

About

GPL v2 tooling for disposable phpBB test boards, extension fixtures and styles

Topics

Resources

Contributing

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages