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%
|
|
||
|---|---|---|
| php | ||
| .env | ||
| .env.example | ||
| .gitignore | ||
| backup.sh | ||
| docker-compose.yml | ||
| LICENSE | ||
| README.md | ||
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
./smfbefore you start the stack.
Prerequisites
- Docker & Docker Compose plugin
.envfile (see.env.example)
Setup
- Copy
.env.exampleto.envand set your values (DB credentials, backup schedule, optional Redis password). - Prepare folders:
mkdir -p smf db redis backups. - Download the SMF release archive from the official site and extract it into
./smf(the directory will be mounted at/var/www/html). - Start the stack:
docker compose up -d --build - 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 underphp/conf.d/.db: MariaDB 10.11 with data persisted to./db.redis: Redis 7 for PHP sessions (enableREDIS_PASSWORDin.envto require auth).backup: Runs nightlymysqldumpto./backupsatBACKUP_TIME, keeping files forBACKUP_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 pointMYSQL_HOSTat an external DB if desired.
Backups
- Stored under
./backupsas 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:00andBACKUP_RETENTION_DAYS=7if unset.