Fix update PHP config

This commit is contained in:
TuxGasy 2023-01-15 10:42:52 +01:00
parent 24c5fcb5a7
commit 0cb2af4ecb
3 changed files with 7 additions and 5 deletions

View File

@ -34,6 +34,8 @@ services:
build: . build: .
environment: environment:
HOST_USER_ID: $HOST_USER_ID HOST_USER_ID: $HOST_USER_ID
PHP_INI_DATE_TIMEZONE: $PHP_INI_DATE_TIMEZONE
PHP_INI_MEMORY_LIMIT: $PHP_INI_MEMORY_LIMIT
volumes: volumes:
- ../../htdocs:/var/www/html/ - ../../htdocs:/var/www/html/
- ../../documents:/var/documents - ../../documents:/var/documents

View File

@ -15,10 +15,10 @@ fi
echo "[docker-run] => Set Permission to www-data for /var/documents" echo "[docker-run] => Set Permission to www-data for /var/documents"
chown -R www-data:www-data /var/documents chown -R www-data:www-data /var/documents
if [ ! -f /usr/local/etc/php/php.ini ]; then echo "[docker-run] => update ${PHP_INI_DIR}/conf.d/dolibarr-php.ini"
cat <<EOF > /usr/local/etc/php/php.ini cat <<EOF > ${PHP_INI_DIR}/conf.d/dolibarr-php.ini
date.timezone = $PHP_INI_DATE_TIMEZONE date.timezone = ${PHP_INI_DATE_TIMEZONE:-UTC}
memory_limit = ${PHP_INI_MEMORY_LIMIT:-256M}
EOF EOF
fi
exec apache2-foreground exec apache2-foreground