feat(): add debug mode
parent
8cbb560f59
commit
eeb4494589
|
@ -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
|
||||
|
|
7
startup
7
startup
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in New Issue