docs(): update readme and restore port 8888

pull/34/head
Magicalex 2018-11-30 10:26:05 +01:00
parent cad880104c
commit 032c55b304
No known key found for this signature in database
GPG Key ID: A89B48B1788C3CB5
4 changed files with 70 additions and 33 deletions

View File

@ -50,5 +50,5 @@ RUN echo "@community https://nl.alpinelinux.org/alpine/v3.8/community" >> /etc/a
COPY rootfs /
RUN chmod +x /usr/local/bin/* /services/*/run /services/.s6-svscan/*
VOLUME /flarum/app/extensions /etc/nginx/conf.d
EXPOSE 8080
EXPOSE 8888
CMD ["run.sh"]

View File

@ -20,7 +20,7 @@ Simple forum software for building great communities. http://flarum.org/
### Ports
- **8080**
- **8888**
### Volume
@ -47,7 +47,7 @@ Simple forum software for building great communities. http://flarum.org/
| **OPCACHE_MEMORY_LIMIT** | OPcache memory size in megabytes | *optional* | 128
| **LOG_TO_STDOUT** | Enable nginx and php error logs to stdout | *optional* | false
### Required environment variable for installation
### Required environment variable for first installation
| Variable | Description | Type | Default value |
| -------- | ----------- | ---- | ------------- |
@ -102,9 +102,11 @@ services:
You need a reverse proxy to access flarum, this is not described here. You can use the solution of your choice (Traefik, Nginx, Apache, Haproxy, Caddy, H2O...etc).
Create a env file (see docker-compose -> /mnt/docker/flarum/flarum.env)
Create a environment file (see docker-compose: /mnt/docker/flarum/flarum.env [here](https://github.com/mondediefr/docker-flarum/tree/master#2---docker-composeyml))
```
# vi /mnt/docker/flarum/flarum.env
DEBUG=false
FORUM_URL=http://domain.tld
@ -116,58 +118,92 @@ DB_PASS=xxxxxxxxxx
DB_PREF=flarum_
DB_PORT=3306
# User admin flarum
## admin password must contain at least 8 characters
# User admin flarum (environment variable for first installation)
# /!\ admin password must contain at least 8 characters /!\
FLARUM_ADMIN_USER=admin
FLARUM_ADMIN_PASS=xxxxxxxxxx
FLARUM_ADMIN_MAIL=admin@domain.tld
FLARUM_TITLE=Test flarum
```
run docker-flarum
```
Run your docker-compose
```sh
docker-compose up -d
```
* :warning: Your admin password must contain at least **8 characters**.
* You can't use MariaDB **10.2** or **10.3** for the moment. More information on this issue [here](https://github.com/flarum/core/issues/1211).
* :warning: Your admin password must contain at least **8 characters** (FLARUM_ADMIN_PASS).
* If you get an error 500 with _Something went wrong_ message, switch the `DEBUG` environment variable to `true` to see the actual error message in your browser.
![flarum-home](http://i.imgur.com/6kH9iTV.png)
### Upgrade to v0.1.0-beta.8 from v0.1.0-beta.7
### Upgrade to v0.1.0-beta.8 from v0.1.0-beta.7.2
:warning: Disable 3rd party extensions prior to upgrading in panel admin.
:warning: Backup your database, config.php, composer.lock and assets folder
:warning: Disable all 3rd party extensions prior to upgrading in panel admin.
Add installed.txt file in assets folder
1 - Add `installed.txt` file in assets folder
Make sure to mount your assets folder with the folder /flarum/app/public/assets
```
```sh
touch /mnt/docker/flarum/assets/installed.txt
chown $UID:$GID /mnt/docker/flarum/assets/installed.txt
chown UID:GID /mnt/docker/flarum/assets/installed.txt
```
Remove old assets
2 - Create your own environment file
```
cd /mnt/docker/flarum/assets
rm *.js *.css *.json
# vi /mnt/docker/flarum/flarum.env
DEBUG=false
FORUM_URL=http://domain.tld
# Database configuration
DB_HOST=mariadb
DB_NAME=flarum
DB_USER=flarum
DB_PASS=xxxxxxxxxx
DB_PREF=flarum_
DB_PORT=3306
# environment variable not required
#FLARUM_ADMIN_USER=admin
#FLARUM_ADMIN_PASS=xxxxxxxxxx
#FLARUM_ADMIN_MAIL=admin@domain.tld
#FLARUM_TITLE=Test flarum
```
Create env file + set chown on this file
Update your docker-composer file
```sh
chown UID:GID /mnt/docker/flarum/flarum.env
```
3 - Update your docker-compose file, see an example [here](https://github.com/mondediefr/docker-flarum/tree/master#2---docker-composeyml)
4 - Pull the last docker images
```sh
docker pull mondedie/docker-flarum:0.1.0-beta.8-stable
docker-compose stop flarum
docker-compose rm flarum
docker-compose up -d
```
and...
5 - Updating your database and removing old assets: (**container_flarum** is the name of your container)
### Upgrade to v0.1.0-beta.7 from v0.1.0-beta.6
```sh
docker exec -ti flarum php /flarum/app/flarum migrate
docker exec -ti flarum php /flarum/app/flarum cache:clear
```
Since the flarum-english extension has been renamed to flarum-lang-english, you'll need to to re-enable it from the admin panel.
After that your upgrade is finish. :tada: :tada:
### Upgrade to v0.1.0-beta.7.2 from v0.1.0-beta.6
:warning: Disable 3rd party extensions prior to upgrading.
```
docker pull mondedie/docker-flarum:0.1.0-beta.7.1-stable
```sh
docker pull mondedie/docker-flarum:0.1.0-beta.7.2-stable
docker-compose up -d
```
@ -177,7 +213,7 @@ Navigate to `yourforum.com/admin`, enter your database password and update.
Remove and restart your container:
```
```sh
docker-compose stop flarum
docker-compose rm flarum
docker-compose up -d
@ -185,23 +221,23 @@ docker-compose up -d
### Install custom extensions
**Flarum extensions list :** https://packagist.org/search/?q=flarum-ext
**Flarum extensions list :** https://flagrow.io/extensions
#### Install an extension
```
```sh
docker exec -ti flarum extension require some/extension
```
#### Remove an extension
```
```sh
docker exec -ti flarum extension remove some/extension
```
#### List all extensions
```
```sh
docker exec -ti flarum extension list
```

View File

@ -53,7 +53,7 @@ http {
image/svg+xml;
server {
listen 8080;
listen 8888;
charset utf-8;
root /flarum/app/public;

View File

@ -110,6 +110,7 @@ else
-e "s|<FLARUM_ADMIN_MAIL>|${FLARUM_ADMIN_MAIL}|g" \
-e "s|<FLARUM_TITLE>|${FLARUM_TITLE}|g" /flarum/app/config.yml
# Install flarum
php /flarum/app/flarum install --file=/flarum/app/config.yml
echo "[INFO] End of flarum installation"