mirror of
https://github.com/invoiceninja/dockerfiles.git
synced 2026-01-06 22:47:26 +01:00
Compare commits
29 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
0f9d39998f | ||
|
|
fd01abb0a0 | ||
|
|
6887e2b30a | ||
|
|
6faf1dc135 | ||
|
|
d7cd59c80f | ||
|
|
8206377870 | ||
|
|
93214291c9 | ||
|
|
f3477e6e80 | ||
|
|
d766e8284c | ||
|
|
08e24b4b01 | ||
|
|
43cc7417ba | ||
|
|
150abf1d6e | ||
|
|
31b3d309b3 | ||
|
|
cb74a1f93b | ||
|
|
f566ec5715 | ||
|
|
91cc86af6d | ||
|
|
7bac478538 | ||
|
|
f93fa6b874 | ||
|
|
d9a40ebb43 | ||
|
|
db5d0ebf50 | ||
|
|
926b3d618b | ||
|
|
85d256a435 | ||
|
|
acf9c22ff7 | ||
|
|
b0ebac9719 | ||
|
|
65c5ceb69b | ||
|
|
6aa39b4b57 | ||
|
|
c4ac430d1b | ||
|
|
87066953d3 | ||
|
|
3969a37852 |
@@ -3,7 +3,7 @@ ARG BAK_STORAGE_PATH=/var/www/app/docker-backup-storage/
|
|||||||
ARG BAK_PUBLIC_PATH=/var/www/app/docker-backup-public/
|
ARG BAK_PUBLIC_PATH=/var/www/app/docker-backup-public/
|
||||||
|
|
||||||
# Get Invoice Ninja and install nodejs packages
|
# Get Invoice Ninja and install nodejs packages
|
||||||
FROM --platform=$BUILDPLATFORM node:lts-alpine as build
|
FROM --platform=$BUILDPLATFORM node:lts-alpine as nodebuild
|
||||||
|
|
||||||
# Download Invoice Ninja
|
# Download Invoice Ninja
|
||||||
ARG INVOICENINJA_VERSION
|
ARG INVOICENINJA_VERSION
|
||||||
@@ -20,25 +20,17 @@ RUN mkdir -p /var/www/app \
|
|||||||
RUN curl -LGO $(curl https://api.github.com/repos/invoiceninja/ui/releases/latest | grep "browser_download_url" | awk '{ print $2 }' | sed 's/,$//' | sed 's/"//g');
|
RUN curl -LGO $(curl https://api.github.com/repos/invoiceninja/ui/releases/latest | grep "browser_download_url" | awk '{ print $2 }' | sed 's/,$//' | sed 's/"//g');
|
||||||
RUN cp invoiceninja-react.zip /tmp/invoiceninja-react.zip
|
RUN cp invoiceninja-react.zip /tmp/invoiceninja-react.zip
|
||||||
RUN unzip /tmp/invoiceninja-react.zip
|
RUN unzip /tmp/invoiceninja-react.zip
|
||||||
|
RUN mkdir /var/www/app/public/react/v$INVOICENINJA_VERSION/
|
||||||
|
RUN cp -r dist/react/* /var/www/app/public/react/v$INVOICENINJA_VERSION/
|
||||||
RUN cp -r dist/react/* /var/www/app/public/react/
|
RUN cp -r dist/react/* /var/www/app/public/react/
|
||||||
|
|
||||||
RUN mkdir -p /var/www/app/public/tinymce_6.4.2/tinymce/js/
|
RUN mkdir -p /var/www/app/public/tinymce_6.4.2/tinymce/js/
|
||||||
RUN cp -r dist/tinymce_6.4.2/* /var/www/app/public/tinymce_6.4.2/
|
RUN cp -r dist/tinymce_6.4.2/* /var/www/app/public/tinymce_6.4.2/
|
||||||
|
|
||||||
# Download and extract the latest react application
|
# Download and extract the latest react application
|
||||||
#
|
#
|
||||||
WORKDIR /var/www/app/
|
|
||||||
|
|
||||||
# Install node packages
|
|
||||||
ARG BAK_STORAGE_PATH
|
|
||||||
ARG BAK_PUBLIC_PATH
|
|
||||||
RUN --mount=target=/var/www/app/node_modules,type=cache \
|
|
||||||
npm install --production \
|
|
||||||
&& npm run production \
|
|
||||||
&& mv /var/www/app/storage $BAK_STORAGE_PATH \
|
|
||||||
&& mv /var/www/app/public $BAK_PUBLIC_PATH
|
|
||||||
|
|
||||||
# Prepare php image
|
# Prepare php image
|
||||||
FROM php:${PHP_VERSION}-fpm-alpine as prod
|
FROM php:${PHP_VERSION}-fpm-alpine as phpbuild
|
||||||
|
|
||||||
LABEL maintainer="David Bomba <turbo124@gmail.com>"
|
LABEL maintainer="David Bomba <turbo124@gmail.com>"
|
||||||
|
|
||||||
@@ -96,7 +88,7 @@ ARG BAK_PUBLIC_PATH
|
|||||||
ENV INVOICENINJA_VERSION $INVOICENINJA_VERSION
|
ENV INVOICENINJA_VERSION $INVOICENINJA_VERSION
|
||||||
ENV BAK_STORAGE_PATH $BAK_STORAGE_PATH
|
ENV BAK_STORAGE_PATH $BAK_STORAGE_PATH
|
||||||
ENV BAK_PUBLIC_PATH $BAK_PUBLIC_PATH
|
ENV BAK_PUBLIC_PATH $BAK_PUBLIC_PATH
|
||||||
COPY --from=build --chown=$INVOICENINJA_USER:$INVOICENINJA_USER /var/www/app /var/www/app
|
COPY --from=nodebuild --chown=$INVOICENINJA_USER:$INVOICENINJA_USER /var/www/app /var/www/app
|
||||||
|
|
||||||
USER $UID
|
USER $UID
|
||||||
WORKDIR /var/www/app
|
WORKDIR /var/www/app
|
||||||
@@ -104,7 +96,26 @@ WORKDIR /var/www/app
|
|||||||
# Do not remove this ENV
|
# Do not remove this ENV
|
||||||
ENV IS_DOCKER true
|
ENV IS_DOCKER true
|
||||||
RUN /usr/local/bin/composer install --no-dev --no-scripts --no-interaction
|
RUN /usr/local/bin/composer install --no-dev --no-scripts --no-interaction
|
||||||
RUN /usr/local/bin/composer dump-autoload --optimize --no-dev --classmap-authoritative --no-scripts --no-interaction
|
RUN /usr/local/bin/composer dump-autoload --optimize --no-dev --classmap-authoritative --no-scripts --no-interaction
|
||||||
|
|
||||||
|
FROM --platform=$BUILDPLATFORM nodebuild AS dependencybuild
|
||||||
|
|
||||||
|
WORKDIR /var/www/app
|
||||||
|
|
||||||
|
COPY --from=phpbuild /var/www/app/vendor /var/www/app/vendor
|
||||||
|
|
||||||
|
# Install node packages
|
||||||
|
ARG BAK_STORAGE_PATH
|
||||||
|
ARG BAK_PUBLIC_PATH
|
||||||
|
RUN --mount=target=/var/www/app/node_modules,type=cache \
|
||||||
|
npm install \
|
||||||
|
&& npm run production \
|
||||||
|
&& mv /var/www/app/storage $BAK_STORAGE_PATH \
|
||||||
|
&& mv /var/www/app/public $BAK_PUBLIC_PATH
|
||||||
|
|
||||||
|
FROM phpbuild as prod
|
||||||
|
|
||||||
|
COPY --from=dependencybuild --chown=$INVOICENINJA_USER:$INVOICENINJA_USER /var/www/app /var/www/app
|
||||||
|
|
||||||
# Override the environment settings from projects .env file
|
# Override the environment settings from projects .env file
|
||||||
ENV APP_ENV production
|
ENV APP_ENV production
|
||||||
|
|||||||
@@ -13,11 +13,11 @@ type: application
|
|||||||
# This is the chart version. This version number should be incremented each time you make changes
|
# This is the chart version. This version number should be incremented each time you make changes
|
||||||
# to the chart and its templates, including the app version.
|
# to the chart and its templates, including the app version.
|
||||||
# Versions are expected to follow Semantic Versioning (https://semver.org/)
|
# Versions are expected to follow Semantic Versioning (https://semver.org/)
|
||||||
version: 0.10.1
|
version: 0.10.2
|
||||||
# This is the version number of the application being deployed. This version number should be
|
# This is the version number of the application being deployed. This version number should be
|
||||||
# incremented each time you make changes to the application. Versions are not expected to
|
# incremented each time you make changes to the application. Versions are not expected to
|
||||||
# follow Semantic Versioning. They should reflect the version the application is using.
|
# follow Semantic Versioning. They should reflect the version the application is using.
|
||||||
appVersion: 5.5.49
|
appVersion: 5.6.24
|
||||||
keywords:
|
keywords:
|
||||||
- invoiceninja
|
- invoiceninja
|
||||||
home: https://invoiceninja.github.io/dockerfiles
|
home: https://invoiceninja.github.io/dockerfiles
|
||||||
|
|||||||
@@ -18,7 +18,7 @@
|
|||||||
image:
|
image:
|
||||||
registry: docker.io
|
registry: docker.io
|
||||||
repository: invoiceninja/invoiceninja
|
repository: invoiceninja/invoiceninja
|
||||||
tag: 5.5.49
|
tag: 5.6.24
|
||||||
## Defaults to 'Always' if image tag is 'latest', else set to 'IfNotPresent'
|
## Defaults to 'Always' if image tag is 'latest', else set to 'IfNotPresent'
|
||||||
## ref: http://kubernetes.io/docs/user-guide/images/#pre-pulling-images
|
## ref: http://kubernetes.io/docs/user-guide/images/#pre-pulling-images
|
||||||
##
|
##
|
||||||
|
|||||||
@@ -16,6 +16,11 @@ server {
|
|||||||
location = /favicon.ico { access_log off; log_not_found off; }
|
location = /favicon.ico { access_log off; log_not_found off; }
|
||||||
location = /robots.txt { access_log off; log_not_found off; }
|
location = /robots.txt { access_log off; log_not_found off; }
|
||||||
|
|
||||||
|
|
||||||
|
location ~* /storage/.*\.php$ {
|
||||||
|
return 503;
|
||||||
|
}
|
||||||
|
|
||||||
location ~ \.php$ {
|
location ~ \.php$ {
|
||||||
fastcgi_split_path_info ^(.+\.php)(/.+)$;
|
fastcgi_split_path_info ^(.+\.php)(/.+)$;
|
||||||
fastcgi_pass app:9000;
|
fastcgi_pass app:9000;
|
||||||
|
|||||||
Reference in New Issue
Block a user