docker-flarum/README.md

155 lines
3.5 KiB
Markdown
Raw Normal View History

2016-07-17 05:35:13 -04:00
# mondedie/flarum
![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
2016-07-17 05:35:13 -04:00
- Based on Alpine Linux 3.4 with **nginx** and **PHP 7**
- Latest Flarum Beta (v0.1.0-beta.5)
- 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
2016-07-18 02:35:38 -04:00
- **VERSION** = Version of flarum (default: *v0.1.0-beta.5*)
2016-07-17 05:35:13 -04:00
2016-09-25 05:27:13 -04:00
### Ports
- **8888**
### Volume
- **/flarum/app/assets** : Flarum assets directory
2016-07-17 05:35:13 -04:00
### Environment variables
2016-07-18 02:35:38 -04:00
| Variable | Description | Type | Default value |
| -------- | ----------- | ---- | ------------- |
| **GID** | Flarum user id | *optional* | 991
| **UID** | 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
| **MAIL_FROM** | Mail 'from address' | *optional* | none
| **MAIL_HOST** | Mail server FQDN | *optional* | none
| **MAIL_PORT** | Mail server smtp port | *optional* | none
| **MAIL_ENCR** | Encryption protocol, tls (587) or ssl (465) | *optional* | none
| **MAIL_USER** | Username | *optional* | none
| **MAIL_PASS** | Password | *optional* | none
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
```
docker pull mondedie/flarum
2016-07-18 02:35:38 -04:00
```
#### 2 - Create environment file
2016-07-18 01:34:39 -04:00
2016-07-18 02:35:38 -04:00
```
2016-07-18 01:34:39 -04:00
mkdir -p ~/.config/flarum
touch ~/.config/flarum/.env
chmod 600 ~/.config/flarum/.env
```
2016-07-18 02:35:38 -04:00
Create an `.env` file with your environment variables :
2016-07-18 01:34:39 -04:00
```bash
# vim ~/.config/flarum/.env
UID=991 # Optional
GID=991 # Optional
FORUM_URL=https://forum.domain.tld/ # Required
DB_HOST=mariadb # Optional
DB_NAME=flarum # Optional
DB_USER=flarum # Optional
DB_PASS=yyyyyyyy # Required
MAIL_FROM=noreply@domain.tld # Optional
MAIL_HOST=mail.domain.tld # Optional
MAIL_PORT=465 # Optional
MAIL_ENCR=ssl # Optional
MAIL_USER=admin@domain.tld # Optional
MAIL_PASS=xxxxxxxx # Optional
```
2016-07-18 02:35:38 -04:00
#### 3 - 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:
2016-07-18 02:43:07 -04:00
image: mondedie/flarum
container_name: flarum
2016-07-18 01:34:39 -04:00
env_file: ~/.config/flarum/.env
2016-07-17 05:35:13 -04:00
links:
- mariadb:mariadb
volumes:
- /mnt/docker/flarum:/flarum/app/assets
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
- MYSQL_PASSWORD=yyyyyyyy
```
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
```
### Default account
* **Username** : *admin*
* **Password** : *password*
### Install custom extensions
**Flarum extensions list :** https://packagist.org/search/?q=flarum-ext
#### Install an extension
```
docker exec -ti flarum extension require some/extension
```
#### Remove an extension
```
docker exec -ti flarum extension remove some/extension
```
#### List all extensions
```
docker exec -ti flarum extension list
```
2016-07-18 02:35:38 -04:00
### Screenshot
2016-07-18 01:34:39 -04:00
![flarum](https://i.imgur.com/teqg3od.pngP)