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
471c7bd0
Verified
Commit
471c7bd0
authored
3 months ago
by
David Beniamine
Browse files
Options
Downloads
Patches
Plain Diff
A few more optimizations
parent
1c2df4e2
No related branches found
No related tags found
No related merge requests found
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
docker/Dockerfile
+4
-7
4 additions, 7 deletions
docker/Dockerfile
docker/dolibarr.conf
+12
-0
12 additions, 0 deletions
docker/dolibarr.conf
docker/entrypoint.sh
+5
-2
5 additions, 2 deletions
docker/entrypoint.sh
with
21 additions
and
9 deletions
docker/Dockerfile
+
4
−
7
View file @
471c7bd0
...
...
@@ -29,7 +29,9 @@ RUN apt-get update && \
php-json
\
php-ldap
\
php-mbstring
\
php-memcached
\
php-mysqli
\
php-opcache
\
php-pdo-mysql
\
php-soap
\
php-tokenizer
\
...
...
@@ -43,23 +45,18 @@ RUN apt-get update && \
ENV
PHP_VER 8.2
COPY
dolibarr.conf /etc/apache2/sites-enabled/000-default.conf
COPY
dolibarr.ini /etc/php/$PHP_VER/fpm/conf.d/00-dolibarr.ini
COPY
dolibarr.ini /etc/php/$PHP_VER/cli/conf.d/00-dolibarr.ini
RUN
mkdir
-p
/var/www/
RUN
chown
-R
1000:www-data /var/www/
RUN
mkdir
-p
/run/php
RUN
a2enconf php
$PHP_VER
-fpm
.conf
RUN
a2enmod rewrite
RUN
a2enmod proxy
RUN
a2enmod proxy_fcgi
RUN
a2enconf php
$PHP_VER
-fpm
.conf
&&
a2enmod rewrite
&&
a2enmod proxy
&&
a2enmod proxy_fcgi
&&
a2enmod http2
&&
a2enmod expires
#RUN a2enmod calendar
# Install composer
COPY
install_composer.sh /bin
RUN
/bin/install_composer.sh
RUN
mv
/usr/local/bin/composer.phar /usr/local/bin/composer
RUN
/bin/install_composer.sh
&&
mv
/usr/local/bin/composer.phar /usr/local/bin/composer
ARG
LOCALE=en_US-UTF-8
...
...
This diff is collapsed.
Click to expand it.
docker/dolibarr.conf
+
12
−
0
View file @
471c7bd0
...
...
@@ -7,4 +7,16 @@
ErrorLog
${
APACHE_LOG_DIR
}/
dolibarr_erro
..
log
CustomLog
${
APACHE_LOG_DIR
}/
dolibarr_access
.
log
combined
ExpiresActive
On
ExpiresByType
image
/
x
-
icon
A2592000
ExpiresByType
image
/
gif
A2592000
ExpiresByType
image
/
png
A2592000
ExpiresByType
image
/
jpeg
A2592000
ExpiresByType
text
/
css
A2592000
ExpiresByType
text
/
javascript
A2592000
ExpiresByType
application
/
x
-
javascript
A2592000
ExpiresByType
application
/
javascript
A2592000
AddOutputFilterByType
DEFLATE
text
/
html
text
/
plain
text
/
xml
text
/
css
text
/
javascript
application
/
javascript
application
/
x
-
javascript
</
VirtualHost
>
This diff is collapsed.
Click to expand it.
docker/entrypoint.sh
+
5
−
2
View file @
471c7bd0
...
...
@@ -12,7 +12,6 @@ if [ "$ENV" == "prod" ]; then
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
apt-get purge
-y
php-xdebug php
$PHP_VER
-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
...
...
@@ -29,8 +28,12 @@ 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
else
apt-get purge
-y
php-opcache php-memcached
sed
-i
'd/Expires//'
/etc/apache2/sites-enabled/000-default.conf
sed
-i
'd/AddOutputFilterByType//'
/etc/apache2/sites-enabled/000-default.conf
fi
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
php-fpm
$PHP_VER
-D
cron
-f
&
...
...
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