Skip to content
Snippets Groups Projects
Verified Commit 2ff8832e authored by David Beniamine's avatar David Beniamine
Browse files

Few more config improvements

parent 471c7bd0
No related branches found
No related tags found
No related merge requests found
...@@ -10,6 +10,22 @@ max_input_vars = 100000; ...@@ -10,6 +10,22 @@ max_input_vars = 100000;
upload_max_filesize = 200M upload_max_filesize = 200M
; Must be greater than or equal to upload_max_filesize ; Must be greater than or equal to upload_max_filesize
post_max_size = 200M post_max_size = 200M
; Enable Opcache
opcache.enable=1
; Set the memory size for the Opcache (e.g., 128MB)
opcache.memory_consumption=512
; Set the maximum number of scripts to cache
opcache.max_accelerated_files=10000
; Set the cache validity time in seconds
opcache.revalidate_freq=2
; Enable file validation for updated scripts
opcache.validate_timestamps=1
; Set the timeout for a request before it is terminated
opcache.max_file_size=2M
; Enable opcache for the CLI
opcache.enable_cli=1
[xdebug] [xdebug]
xdebug.client_port=9000 xdebug.client_port=9000
xdebug.mode=debug xdebug.mode=debug
......
...@@ -12,26 +12,10 @@ if [ "$ENV" == "prod" ]; then ...@@ -12,26 +12,10 @@ if [ "$ENV" == "prod" ]; then
sed -i '/\(xdebug.*\)/d' /etc/php/$PHP_VER/fpm/conf.d/00-dolibarr.ini sed -i '/\(xdebug.*\)/d' /etc/php/$PHP_VER/fpm/conf.d/00-dolibarr.ini
sed -i '/error/d' /etc/php/$PHP_VER/fpm/conf.d/00-dolibarr.ini sed -i '/error/d' /etc/php/$PHP_VER/fpm/conf.d/00-dolibarr.ini
apt-get purge -y php-xdebug php$PHP_VER-xdebug apt-get purge -y php-xdebug php$PHP_VER-xdebug
cat <<EOF>>/etc/php/$PHP_VER/fpm/conf.d/00-dolibarr.ini
; Enable Opcache
opcache.enable=1
; Set the memory size for the Opcache (e.g., 128MB)
opcache.memory_consumption=512
; Set the maximum number of scripts to cache
opcache.max_accelerated_files=10000
; Set the cache validity time in seconds
opcache.revalidate_freq=2
; Enable file validation for updated scripts
opcache.validate_timestamps=1
; Set the timeout for a request before it is terminated
opcache.max_file_size=2M
; Enable opcache for the CLI
opcache.enable_cli=1
EOF
else else
apt-get purge -y php-opcache php-memcached sed -i '/opcache/d' /etc/php/$PHP_VER/fpm/conf.d/00-dolibarr.ini
sed -i 'd/Expires//' /etc/apache2/sites-enabled/000-default.conf sed -i '/Expires/d' /etc/apache2/sites-enabled/000-default.conf
sed -i 'd/AddOutputFilterByType//' /etc/apache2/sites-enabled/000-default.conf sed -i '/AddOutputFilterByType/d' /etc/apache2/sites-enabled/000-default.conf
fi fi
cp /etc/php/$PHP_VER/fpm/conf.d/00-dolibarr.ini /etc/php/$PHP_VER/cli/conf.d/00-dolibarr.ini cp /etc/php/$PHP_VER/fpm/conf.d/00-dolibarr.ini /etc/php/$PHP_VER/cli/conf.d/00-dolibarr.ini
echo "*/5 * * * * www-data /usr/bin/php /var/www/dolibarr/scripts/cron/cron_run_jobs.php $CRON_KEY $CRON_USER > /var/www/dolibarr/documents/cron_run_jobs.php.log" >> /etc/crontab echo "*/5 * * * * www-data /usr/bin/php /var/www/dolibarr/scripts/cron/cron_run_jobs.php $CRON_KEY $CRON_USER > /var/www/dolibarr/documents/cron_run_jobs.php.log" >> /etc/crontab
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment