Skip to content
CatramPublic

About

PhpBB images

Resources

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

phpbb

The container image for forum.catram.org, published as ghcr.io/catram/phpbb. It is deployed by ansible-playbooks as a rootless Podman Quadlet behind nginx on the host.

What is in the image

  • The current phpBB 3.3 release from download.phpbb.com, checked against its published SHA-256, without the install/ folder.
  • The extensions, styles and language packs in extensions.tsv, styles.tsv and languages.tsv, downloaded from phpBB's Customisation Database at build time by install.sh, each pinned to a version and checked against its SHA-256. phpbb.com is behind Cloudflare, which can turn away automated downloads; a build that hits this fails with a 403 and can simply be run again.
  • overlay/: anything that is not on the Customisation Database, laid out as in the forum's root (ext/<vendor>/<name>, styles/<name>, language/<code>) and copied over the release.
  • PHP 8.5 with Apache, configured by apache.conf and php.ini. phpBB's own .htaccess files are honoured.
  • config.php, which reads everything from the environment.

Running it

The image serves plain HTTP on port 80. It needs:

Variable Meaning
PHPBB_DB_HOST Database host; defaults to mariadb
PHPBB_DB_NAME, PHPBB_DB_USER, PHPBB_DB_PASSWORD Database credentials
PHPBB_TABLE_PREFIX Table prefix; defaults to phpbb_

and these mounts, owned by the container's www-data (UID 33):

Path Contents
/var/www/html/files Attachments
/var/www/html/store Backups and other stored files
/var/www/html/images/avatars/upload Uploaded avatars
/var/www/html/cache Cache; a tmpfs is best, so each start begins empty

After a new release is deployed, migrate the database once:

php /var/www/html/bin/phpbbcli.php db:migrate

Memory

These environment variables size PHP and Apache. The defaults suit a site with little traffic; set any of them in the container's environment to change it.

Variable Default Sets
PHP_MEMORY_LIMIT 256M memory_limit: the most one request may use
PHP_OPCACHE_MEMORY 128 opcache.memory_consumption, in MB: compiled code, shared by all processes
PHP_APCU_SIZE 32M apc.shm_size: APCu's shared cache, phpBB's whole cache
APACHE_START_SERVERS 2 StartServers
APACHE_MIN_SPARE_SERVERS 1 MinSpareServers
APACHE_MAX_SPARE_SERVERS 3 MaxSpareServers: idle processes beyond this are stopped
APACHE_MAX_REQUEST_WORKERS 10 MaxRequestWorkers: requests served at once; others wait
APACHE_MAX_CONNECTIONS_PER_CHILD 500 MaxConnectionsPerChild: a process is replaced after this many

Each Apache process holds its own PHP memory, so the process counts matter most. The shared caches only take memory as they fill.

Extensions, styles and languages

Each list is tab-separated, with a header row: name, version, url, sha256 and note. What name is, and what the zip must hold, depends on the list:

List name The zip holds Installed as
extensions.tsv <vendor>/<name> <vendor>/<name>/composer.json ext/<vendor>/<name>/
styles.tsv the style's folder <name>/style.cfg styles/<name>/
languages.tsv the language code, e.g. zh_cmn_hans one folder with language/<code>/iso.txt that folder copied over the root, so the pack's translations for styles and bundled extensions land too

Not listed, because they come with phpBB: the prosilver style, British English (en), and the phpbb/viglink extension.

To add or update an entry, take the download link of the revision from its page on the Customisation Database, without the ?sid=... part, and its SHA-256:

curl -fsSL <url> | sha256sum

After a new version is deployed, db:migrate runs its migrations too.

Building

Every push to main builds and pushes the image on a GitHub-hosted runner, and so does a weekly scheduled run, which picks up a new phpBB release. Each build is tagged <version>-<run number>, e.g. 3.3.19-12; deployments pin one of these tags. The 3.3 tag always points to the latest build.

About

PhpBB images

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages