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
|
| **GID** | Flarum user id | *optional* | 991
|
||||||
| **UID** | Flarum group id | *optional* | 991
|
| **UID** | Flarum group id | *optional* | 991
|
||||||
|
| **DEBUG** | Flarum debug mode | *optional* | false
|
||||||
| **FORUM_URL** | Forum URL | **required** | none
|
| **FORUM_URL** | Forum URL | **required** | none
|
||||||
| **DB_HOST** | MariaDB instance ip/hostname | *optional* | mariadb
|
| **DB_HOST** | MariaDB instance ip/hostname | *optional* | mariadb
|
||||||
| **DB_USER** | MariaDB database username | *optional* | flarum
|
| **DB_USER** | MariaDB database username | *optional* | flarum
|
||||||
|
|
7
startup
7
startup
|
@ -4,11 +4,13 @@
|
||||||
export DB_HOST
|
export DB_HOST
|
||||||
export DB_USER
|
export DB_USER
|
||||||
export DB_NAME
|
export DB_NAME
|
||||||
|
export DEBUG
|
||||||
|
|
||||||
# Default values
|
# Default values
|
||||||
DB_HOST=${DB_HOST:-mariadb}
|
DB_HOST=${DB_HOST:-mariadb}
|
||||||
DB_USER=${DB_USER:-flarum}
|
DB_USER=${DB_USER:-flarum}
|
||||||
DB_NAME=${DB_NAME:-flarum}
|
DB_NAME=${DB_NAME:-flarum}
|
||||||
|
DEBUG=${DEBUG:-false}
|
||||||
|
|
||||||
# Required env variables
|
# Required env variables
|
||||||
if [ -z "$DB_PASS" ]; then
|
if [ -z "$DB_PASS" ]; then
|
||||||
|
@ -105,6 +107,11 @@ else
|
||||||
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# Set flarum debug mode
|
||||||
|
if [ -f "config.php" ]; then
|
||||||
|
sed -i "s|\('debug' =>\) .*|\1 ${DEBUG},|" config.php
|
||||||
|
fi
|
||||||
|
|
||||||
# Removing installation files
|
# Removing installation files
|
||||||
rm -f config.sql config.yml
|
rm -f config.sql config.yml
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue