Base Docker stack for the Naev forums: PHP 8.4 + Apache, MariaDB, Redis sessions, and a nightly backup helper. Drop in the official SMF release and run with your proxy of choice. https://forum.naev.org/
  • Shell 72.2%
  • Dockerfile 27.8%
Find a file
Jack Greiner 07e8d2be9f
Use mariadb-dump if it's there.
We also don't need to use SSL since the db is part of a private network.
2026-01-02 11:06:47 -05:00
php Bump to PHP 8.4 2025-12-06 04:36:19 -05:00
.env Reword the REDIS configuration 2025-12-06 04:36:47 -05:00
.env.example Clean up the stake slightly 2025-12-06 07:50:42 -05:00
.gitignore Add gitignore for the stack 2025-11-23 05:56:33 -05:00
backup.sh Use mariadb-dump if it's there. 2026-01-02 11:06:47 -05:00
docker-compose.yml Clean up the stake slightly 2025-12-06 07:50:42 -05:00
LICENSE Initial commit 2025-11-23 11:16:46 +01:00
README.md Add a README for the project 2025-12-06 07:52:40 -05:00

Naev Forum Docker Stack

Containerized Simple Machines Forum (SMF) stack with Apache/PHP, MariaDB, Redis for sessions, and automated SQL backups. It’s intentionally simple so you can copy, learn from it, and bend it into your own forum stack.

SMF itself is not bundled. Download the official release from https://download.simplemachines.org/ and unpack it into ./smf before you start the stack.

Prerequisites

  • Docker & Docker Compose plugin
  • .env file (see .env.example)

Setup

  1. Copy .env.example to .env and set your values (DB credentials, backup schedule, optional Redis password).
  2. Prepare folders: mkdir -p smf db redis backups.
  3. Download the SMF release archive from the official site and extract it into ./smf (the directory will be mounted at /var/www/html).
  4. Start the stack:
    docker compose up -d --build
    
  5. Complete the SMF installer at http://localhost:8080. Use the DB credentials from .env.

Using a reverse proxy? Add your proxy’s network and labels as needed; the compose file runs fine standalone. Treat this as your sandbox: borrow, remix, and ship.

Services

  • smf: PHP 8.4 + Apache with optional PHP overrides under php/conf.d/.
  • db: MariaDB 10.11 with data persisted to ./db.
  • redis: Redis 7 for PHP sessions (enable REDIS_PASSWORD in .env to require auth).
  • backup: Runs nightly mysqldump to ./backups at BACKUP_TIME, keeping files for BACKUP_RETENTION_DAYS.

Make it yours

  • Swap in your favorite reverse proxy by attaching its network and labels.
  • Tweak PHP settings by mounting your own files in php/conf.d/.
  • Adjust backup timing/retention in .env, or point MYSQL_HOST at an external DB if desired.

Backups

  • Stored under ./backups as gzip-compressed SQL dumps (smf_YYYY-MM-DD_HH-MM-SS.sql.gz).
  • Restore example:
    gunzip -c backups/smf_YYYY-MM-DD_HH-MM-SS.sql.gz | \
      docker exec -i smf-db mysql -u"$MYSQL_USER" -p"$MYSQL_PASSWORD" "$MYSQL_DATABASE"
    

Configuration Notes

  • PHP overrides for uploads, Redis, and APCu are provided in php/conf.d/; mount your own files to change them.
  • The backup container defaults to BACKUP_TIME=03:00 and BACKUP_RETENTION_DAYS=7 if unset.