仓库 https://github.com/mondediefr/docker-flarum
Features
- Multi-platform image:
linux/386
,linux/amd64
,linux/arm/v6
,linux/arm/v7
,linux/arm64
- Lightweight & secure image
- Based on Alpine Linux 3.16
- nginx and PHP 8.0
- Latest Flarum Framework (v1.3.0)
- MySQL/Mariadb driver
- OPCache extension configured
Ports
- Default: 8888 (configurable)
Environment
Variable Description Type Default value UID Flarum user id optional 991 GID Flarum group id optional 991 DEBUG Flarum debug mode optional false FORUM_URL Forum URL required none DB_HOST MariaDB instance ip/hostname optional mariadb DB_USER MariaDB database username optional flarum DB_NAME MariaDB database name optional flarum DB_PASS MariaDB database password required none DB_PREF Flarum tables prefix optional none DB_PORT MariaDB database port optional 3306 FLARUM_PORT Port to run Flarum on inside the container optional 8888 UPLOAD_MAX_SIZE The maximum size of an uploaded file optional 50M PHP_MEMORY_LIMIT PHP memory limit optional 128M OPCACHE_MEMORY_LIMIT OPcache memory size in megabytes optional 128 LOG_TO_STDOUT Enable nginx and php error logs to stdout optional false GITHUB_TOKEN_AUTH Github token to download private extensions optional false PHP_EXTENSIONS Install additional php extensions optional none
Required environment variable for first installation
Variable Description Type Default value FLARUM_ADMIN_USER Name of your user admin required none FLARUM_ADMIN_PASS User admin password required none FLARUM_ADMIN_MAIL User admin adress mail required none FLARUM_TITLE Set a name of your flarum optional Docker-Flarum
Docker-compose.yml
version: "3"
services:
flarum:
image: mondedie/flarum:stable
container_name: flarum
env_file:
- /mnt/docker/flarum/flarum.env
volumes:
- /mnt/docker/flarum/assets:/flarum/app/public/assets
- /mnt/docker/flarum/extensions:/flarum/app/extensions
- /mnt/docker/flarum/storage/logs:/flarum/app/storage/logs
- /mnt/docker/flarum/nginx:/etc/nginx/flarum
ports:
- 80:8888
depends_on:
- mariadb
mariadb:
image: mariadb:10.5
container_name: mariadb
environment:
- MYSQL_ROOT_PASSWORD=xxxxxxxxxx
- MYSQL_DATABASE=flarum
- MYSQL_USER=flarum
- MYSQL_PASSWORD=xxxxxxxxxx
volumes:
- /mnt/docker/mysql/db:/var/lib/mysql