Added option to send logs to docker logs Issue #184
This commit is contained in:
@@ -24,6 +24,7 @@ The following flags are a list of all the currently supported options that can b
|
||||
| PHP_MEM_LIMIT | Set higher PHP memory limit, default is 128 Mb |
|
||||
| PHP_POST_MAX_SIZE | Set a larger post_max_size, default is 100 Mb |
|
||||
| PHP_UPLOAD_MAX_FILESIZE | Set a larger upload_max_filesize, default is 100 Mb |
|
||||
| PHP_ERRORS_STDERR | Send php logs to docker logs |
|
||||
| DOMAIN | Set domain name for Lets Encrypt scripts |
|
||||
| REAL_IP_HEADER | set to 1 to enable real ip support in the logs |
|
||||
| REAL_IP_FROM | set to your CIDR block for real ip in logs |
|
||||
|
||||
@@ -117,6 +117,12 @@ if [ -f /etc/nginx/sites-available/default-ssl.conf ]; then
|
||||
fi
|
||||
fi
|
||||
|
||||
#Display errors in docker logs
|
||||
if [ ! -z "$PHP_ERRORS_STDERR" ]; then
|
||||
echo "log_errors = On" >> /usr/local/etc/php/conf.d/docker-vars.ini
|
||||
echo "error_log = /dev/stderr" >> /usr/local/etc/php/conf.d/docker-vars.ini
|
||||
fi
|
||||
|
||||
# Increase the memory_limit
|
||||
if [ ! -z "$PHP_MEM_LIMIT" ]; then
|
||||
sed -i "s/memory_limit = 128M/memory_limit = ${PHP_MEM_LIMIT}M/g" /usr/local/etc/php/conf.d/docker-vars.ini
|
||||
|
||||
Reference in New Issue
Block a user