Compare commits

...

5 Commits

Author SHA1 Message Date
David Bomba
89e6cffa90 Merge pull request #246 from turbo124/master
Fixes for crons and folder permissions
2021-01-03 21:34:27 +11:00
David Bomba
a82d60b4f5 Fixes for crons and folder permissions 2021-01-03 21:34:04 +11:00
David Bomba
32c93eb4d7 Merge pull request #241 from beganovich/v5-skip-snappdf-download
(v5) Add environment variable to skip downloading Chromium (snappdf)
2020-12-30 09:26:34 +11:00
=
9e603ba79f Fixes for crontab 2020-12-30 07:33:50 +11:00
Benjamin Beganović
d9889fcfaa Add variable to skip Chromium download 2020-12-28 14:25:16 +01:00
2 changed files with 21 additions and 6 deletions

View File

@@ -53,6 +53,7 @@ RUN set -eux; \
libzip-dev \
oniguruma-dev \
git \
busybox-suid \
zip; \
docker-php-ext-configure gd --with-freetype --with-jpeg; \
docker-php-ext-install -j$(nproc) \
@@ -95,15 +96,10 @@ RUN addgroup -S "$INVOICENINJA_USER" && \
addgroup "$INVOICENINJA_USER" www-data; \
chown -R "$INVOICENINJA_USER":"$INVOICENINJA_USER" /var/www/app
# Install Composer
RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer;
## 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 /usr/local/bin/composer install --no-dev --no-suggest --no-progress --quiet

View File

@@ -42,6 +42,7 @@ services:
- DB_DATABASE1=ninja
- PHANTOMJS_PDF_GENERATION=false
- SNAPPDF_EXECUTABLE_PATH="/usr/bin/chromium-browser"
- SNAPPDF_SKIP_DOWNLOAD=true
volumes:
# Configure your mounted directories, make sure the folder 'public' and 'storage'
# exist, before mounting them
@@ -70,6 +71,24 @@ services:
networks:
- invoiceninja
# V5 crons only
cron:
image: invoiceninja/invoiceninja:5
volumes:
- public:/var/www/app/public
- storage:/var/www/app/storage
entrypoint: |
/bin/sh -c 'sh -s <<EOF
trap "break;exit" SIGHUP SIGINT SIGTERM
sleep 60s
while /bin/true; do
./artisan schedule:run >> /dev/null 2>&1
sleep 60s
done
EOF'
networks:
- invoiceninja
# THIS IS ONLY A VALID CONFIGURATION FOR IN 4. DO NOT USE FOR IN 5.
# cron:
# image: invoiceninja/invoiceninja:alpine-4