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

Add cronjob and improve production mode

parent d80abbbb
No related branches found
No related tags found
No related merge requests found
COMPOSE_FILE=docker-compose.yml:dev.yml
ENV=local
CRON_KEY="getItFromDolibarrScheduledJobModulePageThanRestart"
CRON_USER="admin"
PORT=8080
DOLI_URL=http://localhost:8080
DOLI_VERSION=11.0.3
......
version: "3"
services:
dolibarr:
ports:
- "${PORT}:80"
......@@ -25,8 +25,9 @@ services:
DOLI_DB_NAME: dolibarr
DOLI_URL_ROOT: ${DOLI_URL}
PHP_INI_DATE_TIMEZONE: 'Europe/Paris'
ports:
- "${PORT}:80"
CRON_KEY: ${CRON_KEY}
CRON_USER: ${CRON_USER}
ENV: ${ENV}
restart: ${RESTART}
links:
- mariadb
......@@ -10,6 +10,7 @@ RUN apt-get install -y \
chromium-driver\
chromium\
curl \
cron \
git\
gnupg\
libldap2-dev\
......
error_reporting = E_ALL
display_errors = On
display_startup_errors = On
xdebug.remote_port=9000
xdebug.remote_enable=1
xdebug.remote_connect_back=1
[xdebug]
xdebug.client_port=9000
xdebug.mode=debug
xdebug.start_with_request=yes
xdebug.discover_client_host=true
......@@ -7,5 +7,12 @@ fi
cd /var/www/dolibarr
git fetch
git checkout $DOLI_VERSION
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/cli/conf.d/00-dolibarr.ini
apt-get purge -y php-xdebug
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
php-fpm$PHP_VER -D
cron -f &
apache2ctl -DFOREGROUND
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment