2016-12-11 01:35:16 -05:00
|
|
|
# mondedie/docker-flarum
|
2016-07-17 05:35:13 -04:00
|
|
|
|
|
|
|
![logo](https://i.imgur.com/Bjrtbsc.png "logo")
|
|
|
|
|
|
|
|
### What is this ?
|
|
|
|
|
2016-07-18 02:35:38 -04:00
|
|
|
Flarum is the next-generation forum software that makes online discussion fun. It's simple, fast, and free. http://flarum.org/
|
2016-07-17 05:35:13 -04:00
|
|
|
|
|
|
|
### Features
|
|
|
|
|
2016-07-18 02:35:38 -04:00
|
|
|
- Lightweight & secure image
|
2017-05-13 05:12:25 -04:00
|
|
|
- Based on Alpine Linux with **nginx** and **PHP 7**
|
2017-07-22 03:45:12 -04:00
|
|
|
- Latest Flarum Beta (v0.1.0-beta.7)
|
2016-07-17 05:35:13 -04:00
|
|
|
- MySQL/Mariadb driver
|
2016-07-18 02:35:38 -04:00
|
|
|
- OPCache extension configured
|
2016-07-17 05:35:13 -04:00
|
|
|
|
|
|
|
### Build-time variables
|
|
|
|
|
2017-07-22 03:45:12 -04:00
|
|
|
- **VERSION** = Version of flarum (default: *v0.1.0-beta.7*)
|
2016-07-17 05:35:13 -04:00
|
|
|
|
2017-05-13 05:12:25 -04:00
|
|
|
### Ports
|
2016-09-25 05:27:13 -04:00
|
|
|
|
|
|
|
- **8888**
|
|
|
|
|
|
|
|
### Volume
|
|
|
|
|
|
|
|
- **/flarum/app/assets** : Flarum assets directory
|
2016-12-19 02:38:23 -05:00
|
|
|
- **/flarum/app/extensions** : Flarum extension directory
|
2016-09-25 05:27:13 -04:00
|
|
|
|
2016-07-17 05:35:13 -04:00
|
|
|
### Environment variables
|
|
|
|
|
2016-07-18 02:35:38 -04:00
|
|
|
| Variable | Description | Type | Default value |
|
|
|
|
| -------- | ----------- | ---- | ------------- |
|
2016-12-11 01:35:16 -05:00
|
|
|
| **UID** | Flarum user id | *optional* | 991
|
|
|
|
| **GID** | Flarum group id | *optional* | 991
|
2016-08-08 02:09:01 -04:00
|
|
|
| **DEBUG** | Flarum debug mode | *optional* | false
|
2016-07-18 02:35:38 -04:00
|
|
|
| **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
|
2016-10-28 13:29:42 -04:00
|
|
|
| **DB_PREF** | Flarum tables prefix | *optional* | none
|
2017-05-13 05:12:25 -04:00
|
|
|
| **UPLOAD_MAX_SIZE** | The maximum size of an uploaded file | *optional* | 50M
|
2016-07-17 05:35:13 -04:00
|
|
|
|
2016-07-18 02:35:38 -04:00
|
|
|
## Installation
|
|
|
|
|
|
|
|
#### 1 - Pull flarum image
|
2016-07-18 01:34:39 -04:00
|
|
|
|
|
|
|
```
|
2016-10-23 17:18:57 -04:00
|
|
|
# Pull from hub.docker.com :
|
2017-07-22 03:45:12 -04:00
|
|
|
docker pull mondedie/docker-flarum:0.1.0-beta.7-stable
|
2016-10-23 17:18:57 -04:00
|
|
|
|
|
|
|
# or build it manually :
|
2016-12-11 01:35:16 -05:00
|
|
|
docker build -t mondedie/docker-flarum https://github.com/mondediefr/flarum.git#master
|
2016-07-18 02:35:38 -04:00
|
|
|
```
|
|
|
|
|
2016-10-23 17:01:02 -04:00
|
|
|
#### 2 - Docker-compose.yml
|
2016-07-17 05:35:13 -04:00
|
|
|
|
2016-07-18 02:35:38 -04:00
|
|
|
Adapt to your needs :
|
2016-07-17 05:35:13 -04:00
|
|
|
|
|
|
|
```
|
|
|
|
flarum:
|
2017-07-22 03:45:12 -04:00
|
|
|
image: mondedie/docker-flarum:0.1.0-beta.7-stable
|
2016-07-18 02:43:07 -04:00
|
|
|
container_name: flarum
|
2016-07-17 05:35:13 -04:00
|
|
|
links:
|
|
|
|
- mariadb:mariadb
|
2016-10-23 17:01:02 -04:00
|
|
|
environment:
|
|
|
|
- FORUM_URL=https://forum.domain.tld
|
|
|
|
- DB_PASS=xxxxxxxx
|
2016-07-17 05:35:13 -04:00
|
|
|
volumes:
|
2016-12-02 02:23:11 -05:00
|
|
|
- /mnt/docker/flarum/assets:/flarum/app/assets
|
|
|
|
- /mnt/docker/flarum/extensions:/flarum/app/extensions
|
2016-07-17 05:35:13 -04:00
|
|
|
|
|
|
|
mariadb:
|
|
|
|
image: mariadb:10.1
|
|
|
|
container_name: mariadb
|
|
|
|
volumes:
|
|
|
|
- /mnt/docker/mysql/db:/var/lib/mysql
|
|
|
|
environment:
|
|
|
|
- MYSQL_ROOT_PASSWORD=xxxxxxxx
|
|
|
|
- MYSQL_DATABASE=flarum
|
|
|
|
- MYSQL_USER=flarum
|
2016-10-23 17:01:02 -04:00
|
|
|
- MYSQL_PASSWORD=xxxxxxxx
|
2016-07-17 05:35:13 -04:00
|
|
|
```
|
|
|
|
|
2016-07-18 02:35:38 -04:00
|
|
|
#### 4 - Reverse proxy setup
|
|
|
|
|
|
|
|
See : https://github.com/mondediefr/flarum/wiki/Reverse-proxy-example
|
|
|
|
|
|
|
|
#### 5 - Done, congratulation ! :tada:
|
|
|
|
|
|
|
|
You can now run Flarum :
|
2016-07-17 05:35:13 -04:00
|
|
|
|
|
|
|
```
|
|
|
|
docker-compose up -d
|
|
|
|
```
|
|
|
|
|
2017-07-22 03:45:12 -04:00
|
|
|
### Upgrade from v0.1.0-beta.6
|
2016-10-24 17:23:29 -04:00
|
|
|
|
|
|
|
:warning: Disable 3rd party extensions prior to upgrading.
|
|
|
|
|
|
|
|
```
|
2017-07-22 03:45:12 -04:00
|
|
|
docker pull mondedie/docker-flarum:0.1.0-beta.7-stable && docker-compose up -d
|
2016-10-24 17:23:29 -04:00
|
|
|
```
|
|
|
|
|
|
|
|
Navigate to `yourforum.com/admin`, enter your database password and update.
|
|
|
|
|
|
|
|
![flarum-update](https://images.mondedie.fr/udl8j4Ue/PueJSigV.png)
|
|
|
|
|
|
|
|
Remove and restart your container :
|
|
|
|
|
|
|
|
```
|
|
|
|
docker-compose stop flarum
|
|
|
|
docker-compose rm flarum
|
|
|
|
docker-compose up -d
|
|
|
|
```
|
|
|
|
|
2016-07-23 11:46:59 -04:00
|
|
|
### Install custom extensions
|
|
|
|
|
|
|
|
**Flarum extensions list :** https://packagist.org/search/?q=flarum-ext
|
|
|
|
|
|
|
|
#### Install an extension
|
|
|
|
|
|
|
|
```
|
2016-10-05 02:40:34 -04:00
|
|
|
docker exec -ti flarum extension require some/extension
|
2016-07-23 11:46:59 -04:00
|
|
|
```
|
|
|
|
|
|
|
|
#### Remove an extension
|
|
|
|
|
|
|
|
```
|
2016-10-05 02:40:34 -04:00
|
|
|
docker exec -ti flarum extension remove some/extension
|
2016-07-23 11:46:59 -04:00
|
|
|
```
|
|
|
|
|
|
|
|
#### List all extensions
|
|
|
|
|
|
|
|
```
|
2016-10-05 02:40:34 -04:00
|
|
|
docker exec -ti flarum extension list
|
2016-07-23 11:46:59 -04:00
|
|
|
```
|
|
|
|
|
2016-10-29 13:36:42 -04:00
|
|
|
### Custom error pages
|
|
|
|
|
2016-12-02 02:23:11 -05:00
|
|
|
To use custom error pages, add your .html files in `/mnt/docker/flarum/assets/errors` folder :
|
2016-10-29 13:36:42 -04:00
|
|
|
|
|
|
|
```
|
2016-12-02 02:23:11 -05:00
|
|
|
mkdir -p /mnt/docker/flarum/assets/errors
|
2016-10-29 13:36:42 -04:00
|
|
|
touch 403.html 404.html 500.html 503.html
|
|
|
|
chown -R 991:991 /mnt/docker/flarum
|
|
|
|
```
|
|
|
|
|
2016-12-02 02:23:11 -05:00
|
|
|
### Custom composer repositories
|
|
|
|
|
|
|
|
To use the composer repository system, add your repo name and json representation in `/mnt/docker/flarum/extensions/composer.repositories.txt` :
|
|
|
|
|
2016-11-06 03:01:52 -05:00
|
|
|
```
|
2016-12-02 02:23:11 -05:00
|
|
|
my_private_repo|{"type":"path","url":"extensions/*/"}
|
|
|
|
my_public_repo|{"type":"vcs","url":"https://github.com/my/repo"}
|
|
|
|
```
|
|
|
|
|
|
|
|
https://getcomposer.org/doc/03-cli.md#modifying-repositories
|
2016-11-06 03:01:52 -05:00
|
|
|
|
2016-07-18 02:35:38 -04:00
|
|
|
### Screenshot
|
2016-07-18 01:34:39 -04:00
|
|
|
|
2016-10-24 17:23:29 -04:00
|
|
|
#### Installation
|
|
|
|
|
2017-05-13 05:12:25 -04:00
|
|
|
:warning: **Admin password must contain at least 8 characters.**
|
|
|
|
|
2016-10-23 17:18:57 -04:00
|
|
|
![flarum-installation](http://i.imgur.com/e3Hscp4.png)
|
2016-10-24 17:23:29 -04:00
|
|
|
|
|
|
|
#### Home page
|
|
|
|
|
2016-10-23 17:18:57 -04:00
|
|
|
![flarum-home](http://i.imgur.com/6kH9iTV.png)
|