Compare commits

...

4 Commits

Author SHA1 Message Date
codedge
8762276c6f Merge pull request #192 from codedge/master
Fix execution of cron daemon
2020-08-19 10:42:15 +02:00
Holger Lösken
afcd9389ed Fix execution of cron daemon 2020-08-19 10:41:40 +02:00
codedge
591c799864 Merge pull request #191 from turbo124/master
Minor fix for docker composer
2020-08-19 08:52:37 +02:00
David Bomba
4c9c5ddd95 Minor fix for docker composer 2020-08-19 10:33:40 +10:00
4 changed files with 8 additions and 9 deletions

View File

@@ -67,10 +67,6 @@ RUN set -eux; \
COPY ./config/php/php.ini /usr/local/etc/php/php.ini
COPY ./config/php/php-cli.ini /usr/local/etc/php/php-cli.ini
## Set up the cronjob
RUN echo "* * * * * run-parts /etc/periodic/1min" >> /etc/crontabs/root
COPY ./config/cron/cronjob_v5.sh /etc/periodic/1min/invoiceninja_cronjob
## Separate user
ENV INVOICENINJA_USER=invoiceninja
@@ -89,9 +85,15 @@ RUN addgroup -S "$INVOICENINJA_USER" && \
RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer; \
composer global require hirak/prestissimo;
## Set up the cronjob and run cron daemon
RUN echo "* * * * * run-parts /etc/periodic/1min" >> /etc/crontabs/root
COPY ./config/cron/cronjob_v5.sh /etc/periodic/1min/invoiceninja_cronjob
RUN chown $INVOICENINJA_USER /etc/periodic/1min/invoiceninja_cronjob && \
crond -l 2 -b
USER $INVOICENINJA_USER
RUN composer install --no-dev --no-suggest --no-progress
RUN composer install --no-dev --no-suggest --no-progress --quiet
# Override the environment settings from projects .env file
ENV APP_ENV production

0
config/cron/cronjob_v5.sh Normal file → Executable file
View File

View File

@@ -55,7 +55,7 @@ services:
- MYSQL_ROOT_PASSWORD=ninjaAdm1nPassword
- MYSQL_USER=ninja
- MYSQL_PASSWORD=ninja
- MYSQL_DATABASE=db-ninja-01
- MYSQL_DATABASE=ninja
volumes:
- mysql-data:/var/lib/mysql:rw
# you may use a bind-mounted host directory instead, so that it is harder to accidentally remove the volume and lose all your data!

View File

@@ -101,7 +101,4 @@ file_env 'S3_SECRET'
php artisan config:cache
php artisan optimize
# Start the cron daemon in background
crond -l 2 -b
exec docker-php-entrypoint "$@"