Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Dolibarr
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
NoCloud
docker
Dolibarr
Commits
1c2df4e2
Verified
Commit
1c2df4e2
authored
3 months ago
by
David Beniamine
Browse files
Options
Downloads
Patches
Plain Diff
Prod perfomance optimizations
parent
9a65746f
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
.env.prod.sample
+1
-1
1 addition, 1 deletion
.env.prod.sample
docker/entrypoint.sh
+19
-3
19 additions, 3 deletions
docker/entrypoint.sh
memcached.yml
+13
-0
13 additions, 0 deletions
memcached.yml
with
33 additions
and
4 deletions
.env.prod.sample
+
1
−
1
View file @
1c2df4e2
COMPOSE_FILE=docker-compose.yml:traefik.yml:expose_mariadb.yml
COMPOSE_FILE=docker-compose.yml:traefik.yml:expose_mariadb.yml
:memcached.yml
# TRAEFIK CONFIG
# TRAEFIK CONFIG
HOST=dolibarr.FQDN
HOST=dolibarr.FQDN
...
...
This diff is collapsed.
Click to expand it.
docker/entrypoint.sh
+
19
−
3
View file @
1c2df4e2
...
@@ -10,10 +10,26 @@ git fetch
...
@@ -10,10 +10,26 @@ git fetch
git checkout
$DOLI_VERSION
git checkout
$DOLI_VERSION
if
[
"
$ENV
"
==
"prod"
]
;
then
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
'/\(xdebug.*\)/d'
/etc/php/
$PHP_VER
/cli/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
sed
-i
'/error/d'
/etc/php/
$PHP_VER
/cli/conf.d/00-dolibarr.ini
apt-get purge
-y
php-xdebug php
$PHP_VER
-xdebug
apt-get purge
-y
php-xdebug
apt-get
install
-y
php-opcache php-memcached
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
cp
/etc/php/
$PHP_VER
/fpm/conf.d/00-dolibarr.ini /etc/php/
$PHP_VER
/cli/conf.d/00-dolibarr.ini
fi
fi
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
php-fpm
$PHP_VER
-D
php-fpm
$PHP_VER
-D
...
...
This diff is collapsed.
Click to expand it.
memcached.yml
0 → 100644
+
13
−
0
View file @
1c2df4e2
services
:
dolibarr
:
depends_on
:
memcached
:
condition
:
service_started
memcached
:
image
:
memcached
command
:
-
--conn-limit=1024
-
--memory-limit=64
-
--threads=4
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment