diff options
-rw-r--r-- | .docker/php/conf.d/local.ini | 2 | ||||
-rw-r--r-- | .docker/php/php-fpm.conf | 4 | ||||
-rw-r--r-- | app/constants.php | 6 | ||||
-rw-r--r-- | doc/docker.markdown | 12 | ||||
-rw-r--r-- | doc/env.markdown | 11 | ||||
-rw-r--r-- | doc/index.markdown | 1 |
6 files changed, 32 insertions, 4 deletions
diff --git a/.docker/php/conf.d/local.ini b/.docker/php/conf.d/local.ini index 12d22cc6..77b6daf0 100644 --- a/.docker/php/conf.d/local.ini +++ b/.docker/php/conf.d/local.ini @@ -2,7 +2,7 @@ expose_php = Off error_reporting = E_ALL display_errors = Off log_errors = On -error_log = syslog +error_log = /dev/stderr date.timezone = UTC allow_url_fopen = On post_max_size = 30M diff --git a/.docker/php/php-fpm.conf b/.docker/php/php-fpm.conf index 0e5eab21..6a9c6459 100644 --- a/.docker/php/php-fpm.conf +++ b/.docker/php/php-fpm.conf @@ -5,6 +5,10 @@ daemonize = no [www] env[DATABASE_URL] = $DATABASE_URL +env[DEBUG] = $DEBUG +env[DEBUG_FILE] = $DEBUG_FILE + +catch_workers_output = yes user = nginx group = nginx listen.owner = nginx diff --git a/app/constants.php b/app/constants.php index 011fa784..4201e6e4 100644 --- a/app/constants.php +++ b/app/constants.php @@ -1,8 +1,8 @@ <?php // Enable/disable debug -defined('DEBUG') or define('DEBUG', false); -defined('DEBUG_FILE') or define('DEBUG_FILE', __DIR__.DIRECTORY_SEPARATOR.'..'.DIRECTORY_SEPARATOR.'data'.DIRECTORY_SEPARATOR.'debug.log'); +defined('DEBUG') or define('DEBUG', getenv('DEBUG')); +defined('DEBUG_FILE') or define('DEBUG_FILE', getenv('DEBUG_FILE') ?: __DIR__.DIRECTORY_SEPARATOR.'..'.DIRECTORY_SEPARATOR.'data'.DIRECTORY_SEPARATOR.'debug.log'); // Plugin directory defined('PLUGINS_DIR') or define('PLUGINS_DIR', __DIR__.DIRECTORY_SEPARATOR.'..'.DIRECTORY_SEPARATOR.'plugins'); @@ -80,7 +80,7 @@ defined('ENABLE_HSTS') or define('ENABLE_HSTS', true); defined('ENABLE_XFRAME') or define('ENABLE_XFRAME', true); // Syslog -defined('ENABLE_SYSLOG') or define('ENABLE_SYSLOG', true); +defined('ENABLE_SYSLOG') or define('ENABLE_SYSLOG', getenv('ENABLE_SYSLOG')); // Default files directory defined('FILES_DIR') or define('FILES_DIR', 'data'.DIRECTORY_SEPARATOR.'files'); diff --git a/doc/docker.markdown b/doc/docker.markdown index 6bd966d3..3f13e954 100644 --- a/doc/docker.markdown +++ b/doc/docker.markdown @@ -69,6 +69,18 @@ You can attach 2 volumes to your container: Use the flag `-v` to mount a volume on the host machine like described in [official Docker documentation](https://docs.docker.com/engine/userguide/containers/dockervolumes/). +Upgrade your container +---------------------- + +- Pull the new image +- Remove the old container +- Restart a new container with the same volumes + +Environment variables +--------------------- + +The list of environment variables is available on [this page](env.markdown). + Config files ------------ diff --git a/doc/env.markdown b/doc/env.markdown new file mode 100644 index 00000000..a01d0a6f --- /dev/null +++ b/doc/env.markdown @@ -0,0 +1,11 @@ +Environment Variables +===================== + +Environment variables maybe useful when Kanboard is deployed as container (Docker). + +| Variable | Description | +|---------------|---------------------------------------------------------------------------------------------------------------------------------| +| DATABASE_URL | `[database type]://[username]:[password]@[host]:[port]/[database name]`, example: `postgres://foo:foo@myserver:5432/kanboard` | +| DEBUG | Enable/Disable debug mode | +| DEBUG_FILE | Debug file location, `DEBUG_FILE=php://stderr` | +| ENABLE_SYSLOG | Enable/Disable logging to Syslog: `ENABLE_SYSLOG=1` | diff --git a/doc/index.markdown b/doc/index.markdown index 99ca01f6..7a3ca8e5 100644 --- a/doc/index.markdown +++ b/doc/index.markdown @@ -105,6 +105,7 @@ Technical details - [Daily background job](cronjob.markdown) - [Config file](config.markdown) +- [Environment variables](env.markdown) - [Email configuration](email-configuration.markdown) - [URL rewriting](nice-urls.markdown) |