mirror of
https://github.com/invoiceninja/dockerfiles.git
synced 2026-01-24 23:32:45 +01:00
align with debian, php 8.3
This commit is contained in:
@@ -1,42 +1,44 @@
|
|||||||
ARG PHP_VERSION=8.2
|
ARG PHP_VERSION=8.3
|
||||||
ARG BAK_STORAGE_PATH=/var/www/app/docker-backup-storage/
|
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 nodebuild
|
FROM --platform=$BUILDPLATFORM php:${PHP_VERSION}-fpm-alpine AS nodebuild
|
||||||
|
|
||||||
# Download Invoice Ninja
|
# Download Invoice Ninja
|
||||||
ARG INVOICENINJA_VERSION
|
ARG INVOICENINJA_VERSION
|
||||||
ARG REPOSITORY=invoiceninja/invoiceninja
|
ARG REPOSITORY=invoiceninja/invoiceninja
|
||||||
ARG FILENAME=invoiceninja.tar
|
ARG FILENAME=invoiceninja.tar
|
||||||
|
|
||||||
RUN set -eux; apk add curl unzip grep
|
RUN mkdir -p /var/www/app
|
||||||
|
|
||||||
RUN DOWNLOAD_URL=$(curl -s "https://api.github.com/repos/invoiceninja/invoiceninja/releases/latest" | grep -o '"browser_download_url": "[^"]*invoiceninja.tar"' | cut -d '"' -f 4) && \
|
|
||||||
curl -LJO "$DOWNLOAD_URL" && \
|
|
||||||
mv invoiceninja.tar /tmp/ninja.tar
|
|
||||||
|
|
||||||
# Extract Invoice Ninja
|
# Extract Invoice Ninja
|
||||||
RUN mkdir -p /var/www/app \
|
RUN apk add --no-cache curl \
|
||||||
&& tar -xvf /tmp/ninja.tar -C /var/www/app/ \
|
&& curl -s "https://api.github.com/repos/invoiceninja/invoiceninja/releases/latest" | \
|
||||||
&& mkdir -p /var/www/app/public/logo /var/www/app/storage
|
grep -o '"browser_download_url": "[^"]*invoiceninja.tar.gz"' | \
|
||||||
|
cut -d '"' -f 4 | \
|
||||||
|
xargs curl -sL | \
|
||||||
|
tar -xz --strip-components=1 -C /var/www/app/ \
|
||||||
|
&& apk --purge del curl
|
||||||
|
|
||||||
|
RUN mkdir -p /var/www/app/public/logo /var/www/app/storage
|
||||||
|
|
||||||
WORKDIR /var/www/app
|
WORKDIR /var/www/app
|
||||||
|
|
||||||
# Prepare php image
|
# Prepare php image
|
||||||
FROM php:${PHP_VERSION}-fpm-alpine as phpbuild
|
FROM php:${PHP_VERSION}-fpm-alpine AS phpbuild
|
||||||
|
|
||||||
LABEL maintainer="David Bomba <turbo124@gmail.com>"
|
LABEL maintainer="David Bomba <turbo124@gmail.com>"
|
||||||
|
|
||||||
|
ARG php_require="bcmath gd pdo_mysql zip"
|
||||||
|
ARG php_suggest="exif imagick intl pcntl soap"
|
||||||
|
ARG php_extra="opcache"
|
||||||
|
|
||||||
# Adding caching_sha2_password.so
|
# Adding caching_sha2_password.so
|
||||||
# With this we get native support for caching_sha2_password
|
# With this we get native support for caching_sha2_password
|
||||||
RUN apk add --no-cache mariadb-connector-c
|
RUN apk add --no-cache mariadb-connector-c
|
||||||
|
|
||||||
RUN mv /usr/local/etc/php/php.ini-production /usr/local/etc/php/php.ini
|
RUN ln -s "${PHP_INI_DIR}/php.ini-production" "${PHP_INI_DIR}/php.ini"
|
||||||
|
|
||||||
# Install PHP extensions
|
|
||||||
# https://hub.docker.com/r/mlocati/php-extension-installer/tags
|
|
||||||
COPY --from=mlocati/php-extension-installer /usr/bin/install-php-extensions /usr/local/bin/
|
|
||||||
|
|
||||||
# Install chromium
|
# Install chromium
|
||||||
RUN set -eux; \
|
RUN set -eux; \
|
||||||
@@ -48,18 +50,11 @@ RUN set -eux; \
|
|||||||
ttf-freefont \
|
ttf-freefont \
|
||||||
ttf-dejavu
|
ttf-dejavu
|
||||||
|
|
||||||
RUN install-php-extensions \
|
# Install PHP extensions
|
||||||
bcmath \
|
RUN ( curl -sSLf https://github.com/mlocati/docker-php-extension-installer/releases/latest/download/install-php-extensions -o - || echo 'return 1' ) | sh -s \
|
||||||
exif \
|
${php_require} \
|
||||||
gd \
|
${php_suggest} \
|
||||||
gmp \
|
${php_extra}
|
||||||
mysqli \
|
|
||||||
opcache \
|
|
||||||
pdo_mysql \
|
|
||||||
zip \
|
|
||||||
intl \
|
|
||||||
@composer \
|
|
||||||
&& rm /usr/local/bin/install-php-extensions
|
|
||||||
|
|
||||||
# Copy files
|
# Copy files
|
||||||
COPY rootfs /
|
COPY rootfs /
|
||||||
|
|||||||
@@ -6,7 +6,6 @@ logfile_maxbytes=0
|
|||||||
loglevel=info
|
loglevel=info
|
||||||
|
|
||||||
[program:php-fpm]
|
[program:php-fpm]
|
||||||
redirect_stderr=true
|
|
||||||
stdout_logfile=/dev/stdout
|
stdout_logfile=/dev/stdout
|
||||||
stdout_logfile_maxbytes=0
|
stdout_logfile_maxbytes=0
|
||||||
stderr_logfile=/dev/stderr
|
stderr_logfile=/dev/stderr
|
||||||
@@ -15,7 +14,6 @@ command=php-fpm
|
|||||||
|
|
||||||
[program:scheduler]
|
[program:scheduler]
|
||||||
autorestart=true
|
autorestart=true
|
||||||
redirect_stderr=true
|
|
||||||
stdout_logfile=/dev/stdout
|
stdout_logfile=/dev/stdout
|
||||||
stdout_logfile_maxbytes=0
|
stdout_logfile_maxbytes=0
|
||||||
stderr_logfile=/dev/stderr
|
stderr_logfile=/dev/stderr
|
||||||
@@ -25,7 +23,6 @@ command=php artisan schedule:work
|
|||||||
[program:queue-worker]
|
[program:queue-worker]
|
||||||
process_name=%(program_name)s_%(process_num)02d
|
process_name=%(program_name)s_%(process_num)02d
|
||||||
autorestart=true
|
autorestart=true
|
||||||
redirect_stderr=true
|
|
||||||
stdout_logfile=/dev/stdout
|
stdout_logfile=/dev/stdout
|
||||||
stdout_logfile_maxbytes=0
|
stdout_logfile_maxbytes=0
|
||||||
stderr_logfile=/dev/stderr
|
stderr_logfile=/dev/stderr
|
||||||
|
|||||||
@@ -1,5 +1,3 @@
|
|||||||
version: '3.7'
|
|
||||||
|
|
||||||
services:
|
services:
|
||||||
server:
|
server:
|
||||||
image: nginx
|
image: nginx
|
||||||
@@ -23,7 +21,9 @@ services:
|
|||||||
- "in5.localhost:192.168.0.124 " #host and ip
|
- "in5.localhost:192.168.0.124 " #host and ip
|
||||||
|
|
||||||
app:
|
app:
|
||||||
image: invoiceninja/invoiceninja:5
|
build:
|
||||||
|
context: ./alpine/5
|
||||||
|
image: invoiceninja/invoiceninja:${TAG:-5}
|
||||||
env_file: env
|
env_file: env
|
||||||
restart: always
|
restart: always
|
||||||
volumes:
|
volumes:
|
||||||
|
|||||||
Reference in New Issue
Block a user