feat(): add debug mode

pull/3/head
Hardware 2016-08-08 08:09:01 +02:00
parent 8cbb560f59
commit eeb4494589
No known key found for this signature in database
GPG Key ID: EC6DF6F90263EDEA
2 changed files with 8 additions and 0 deletions

View File

@ -24,6 +24,7 @@ Flarum is the next-generation forum software that makes online discussion fun. I
| -------- | ----------- | ---- | ------------- |
| **GID** | Flarum user id | *optional* | 991
| **UID** | 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

View File

@ -4,11 +4,13 @@
export DB_HOST
export DB_USER
export DB_NAME
export DEBUG
# Default values
DB_HOST=${DB_HOST:-mariadb}
DB_USER=${DB_USER:-flarum}
DB_NAME=${DB_NAME:-flarum}
DEBUG=${DEBUG:-false}
# Required env variables
if [ -z "$DB_PASS" ]; then
@ -105,6 +107,11 @@ else
fi
# Set flarum debug mode
if [ -f "config.php" ]; then
sed -i "s|\('debug' =>\) .*|\1 ${DEBUG},|" config.php
fi
# Removing installation files
rm -f config.sql config.yml