mirror of
https://github.com/invoiceninja/dockerfiles.git
synced 2026-01-06 14:37:26 +01:00
Compare commits
7 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
89e6cffa90 | ||
|
|
a82d60b4f5 | ||
|
|
32c93eb4d7 | ||
|
|
9e603ba79f | ||
|
|
d9889fcfaa | ||
|
|
a89e145bf9 | ||
|
|
85d46e8968 |
@@ -53,6 +53,7 @@ RUN set -eux; \
|
|||||||
libzip-dev \
|
libzip-dev \
|
||||||
oniguruma-dev \
|
oniguruma-dev \
|
||||||
git \
|
git \
|
||||||
|
busybox-suid \
|
||||||
zip; \
|
zip; \
|
||||||
docker-php-ext-configure gd --with-freetype --with-jpeg; \
|
docker-php-ext-configure gd --with-freetype --with-jpeg; \
|
||||||
docker-php-ext-install -j$(nproc) \
|
docker-php-ext-install -j$(nproc) \
|
||||||
@@ -81,13 +82,6 @@ RUN apk add --no-cache \
|
|||||||
nodejs \
|
nodejs \
|
||||||
yarn
|
yarn
|
||||||
|
|
||||||
# Tell Puppeteer to skip installing Chrome. We'll be using the installed package.
|
|
||||||
ENV PUPPETEER_SKIP_CHROMIUM_DOWNLOAD=true \
|
|
||||||
PUPPETEER_EXECUTABLE_PATH=/usr/bin/chromium-browser
|
|
||||||
|
|
||||||
# Puppeteer v1.19.0 works with Chromium 77.
|
|
||||||
RUN yarn add puppeteer@1.19.0
|
|
||||||
|
|
||||||
## Separate user
|
## Separate user
|
||||||
ENV INVOICENINJA_USER=invoiceninja
|
ENV INVOICENINJA_USER=invoiceninja
|
||||||
|
|
||||||
@@ -102,15 +96,10 @@ RUN addgroup -S "$INVOICENINJA_USER" && \
|
|||||||
addgroup "$INVOICENINJA_USER" www-data; \
|
addgroup "$INVOICENINJA_USER" www-data; \
|
||||||
chown -R "$INVOICENINJA_USER":"$INVOICENINJA_USER" /var/www/app
|
chown -R "$INVOICENINJA_USER":"$INVOICENINJA_USER" /var/www/app
|
||||||
|
|
||||||
|
|
||||||
# Install Composer
|
# Install Composer
|
||||||
RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=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
|
USER $INVOICENINJA_USER
|
||||||
|
|
||||||
RUN /usr/local/bin/composer install --no-dev --no-suggest --no-progress --quiet
|
RUN /usr/local/bin/composer install --no-dev --no-suggest --no-progress --quiet
|
||||||
@@ -118,6 +107,7 @@ RUN /usr/local/bin/composer install --no-dev --no-suggest --no-progress --quiet
|
|||||||
# Override the environment settings from projects .env file
|
# Override the environment settings from projects .env file
|
||||||
ENV APP_ENV production
|
ENV APP_ENV production
|
||||||
ENV LOG errorlog
|
ENV LOG errorlog
|
||||||
|
ENV SNAPPDF_EXECUTABLE_PATH /usr/bin/chromium-browser
|
||||||
|
|
||||||
ENTRYPOINT ["docker-entrypoint"]
|
ENTRYPOINT ["docker-entrypoint"]
|
||||||
CMD ["php-fpm"]
|
CMD ["php-fpm"]
|
||||||
|
|||||||
@@ -41,6 +41,8 @@ services:
|
|||||||
- DB_PASSWORD1=ninja
|
- DB_PASSWORD1=ninja
|
||||||
- DB_DATABASE1=ninja
|
- DB_DATABASE1=ninja
|
||||||
- PHANTOMJS_PDF_GENERATION=false
|
- PHANTOMJS_PDF_GENERATION=false
|
||||||
|
- SNAPPDF_EXECUTABLE_PATH="/usr/bin/chromium-browser"
|
||||||
|
- SNAPPDF_SKIP_DOWNLOAD=true
|
||||||
volumes:
|
volumes:
|
||||||
# Configure your mounted directories, make sure the folder 'public' and 'storage'
|
# Configure your mounted directories, make sure the folder 'public' and 'storage'
|
||||||
# exist, before mounting them
|
# exist, before mounting them
|
||||||
@@ -69,6 +71,24 @@ services:
|
|||||||
networks:
|
networks:
|
||||||
- invoiceninja
|
- 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.
|
# THIS IS ONLY A VALID CONFIGURATION FOR IN 4. DO NOT USE FOR IN 5.
|
||||||
# cron:
|
# cron:
|
||||||
# image: invoiceninja/invoiceninja:alpine-4
|
# image: invoiceninja/invoiceninja:alpine-4
|
||||||
|
|||||||
Reference in New Issue
Block a user