Compare commits

...

26 Commits
5.6.1 ... 5.7.3

Author SHA1 Message Date
David Bomba
bec60de1e7 Merge pull request #524 from turbo124/master
Updates for docker files to use PHP 8.2
2023-07-09 16:21:07 +10:00
David Bomba
c0150debbf Updates for docker files to use PHP 8.2 2023-07-09 16:20:45 +10:00
David Bomba
f45261617f Merge pull request #521 from turbo124/master
Fixes for React builds
2023-07-07 17:59:18 +10:00
David Bomba
21b6cf1f26 Fixes for React builds 2023-07-07 17:58:46 +10:00
David Bomba
d3a4948641 Merge pull request #519 from turbo124/master
Adds options to use config bases php.ini
2023-07-07 16:43:28 +10:00
David Bomba
a9a6b72c7a Position composer dump correctly 2023-07-07 16:43:06 +10:00
David Bomba
4fd6ca33c8 Do no use scripts in composer i 2023-07-07 16:29:57 +10:00
David Bomba
bca8404f5f work around for failing image build 2023-07-06 23:54:13 +10:00
David Bomba
3cf7c28875 Update cache buster 2023-07-06 22:03:26 +10:00
David Bomba
96dee55e7f Revert back to stable 2023-07-06 17:22:27 +10:00
David Bomba
ae592a8407 Revert back to stable 2023-07-06 17:19:27 +10:00
David Bomba
b72757ead0 Fixes for composer 2023-07-06 17:09:50 +10:00
David Bomba
a20fc14683 Add debug to package discovery 2023-07-06 16:00:48 +10:00
David Bomba
0e2934d1e3 Fixes for package discovery 2023-07-06 15:44:39 +10:00
David Bomba
fefc51ccf1 Fixes for package discovery 2023-07-06 14:51:50 +10:00
David Bomba
acdd6851ff fixes for build 2023-07-06 14:05:41 +10:00
David Bomba
6ff8e04aa7 Update cache buster 2023-07-06 13:53:01 +10:00
David Bomba
86f1dd43cf debugging composer 2023-07-06 13:24:16 +10:00
David Bomba
cc1f569324 fixes for composer 2023-07-06 12:49:41 +10:00
David Bomba
c78f7a7bdf fixes for composer 2023-07-06 12:47:13 +10:00
David Bomba
7198222787 debug composer failures 2023-07-06 12:36:12 +10:00
David Bomba
4ef4531a4e Ensure composer is present 2023-07-06 12:17:56 +10:00
David Bomba
c51d113abe Fixes for builds 2023-07-06 11:11:47 +10:00
David Bomba
dddd558873 Fixes for custom php.ini 2023-07-06 11:00:37 +10:00
David Bomba
5727550983 Add options for using config bases php.ini 2023-07-06 10:49:28 +10:00
David Bomba
03536efb6a Add options for using config bases php.ini 2023-07-06 10:48:50 +10:00
7 changed files with 64 additions and 19 deletions

View File

@@ -54,4 +54,4 @@ jobs:
- name: Move cache
run: |
rm -rf /tmp/.buildx-cache
mv /tmp/.buildx-cache-new /tmp/.buildx-cache
mv /tmp/.buildx-cache-new /tmp/.buildx-cache

View File

@@ -1,4 +1,4 @@
ARG PHP_VERSION=8.1
ARG PHP_VERSION=8.2
ARG BAK_STORAGE_PATH=/var/www/app/docker-backup-storage/
ARG BAK_PUBLIC_PATH=/var/www/app/docker-backup-public/
@@ -14,15 +14,16 @@ RUN set -eux; apk add curl unzip
# Extract Invoice Ninja
RUN mkdir -p /var/www/app \
&& tar --strip-components=1 -xf /tmp/ninja.tar.gz -C /var/www/app/ \
&& mkdir -p /var/www/app/public/logo /var/www/app/storage \
&& mv /var/www/app/.env.example /var/www/app/.env \
&& rm -rf /var/www/app/docs /var/www/app/tests
&& mkdir -p /var/www/app/public/logo /var/www/app/storage
# Download and extract the latest react application
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 unzip /tmp/invoiceninja-react.zip
RUN cp -r dist/react/* /var/www/app/public/react/
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/
# Download and extract the latest react application
#
WORKDIR /var/www/app/
@@ -37,7 +38,7 @@ RUN --mount=target=/var/www/app/node_modules,type=cache \
&& mv /var/www/app/public $BAK_PUBLIC_PATH
# Prepare php image
FROM php:${PHP_VERSION}-fpm-alpine3.15 as prod
FROM php:${PHP_VERSION}-fpm-alpine as prod
LABEL maintainer="David Bomba <turbo124@gmail.com>"
@@ -51,6 +52,16 @@ RUN mv /usr/local/etc/php/php.ini-production /usr/local/etc/php/php.ini
# 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
RUN set -eux; \
apk add --no-cache \
font-isas-misc \
supervisor \
mysql-client \
git \
chromium \
ttf-freefont
RUN install-php-extensions \
bcmath \
exif \
@@ -63,16 +74,6 @@ RUN install-php-extensions \
@composer \
&& rm /usr/local/bin/install-php-extensions
# Install chromium
RUN set -eux; \
apk add --no-cache \
font-isas-misc \
supervisor \
mysql-client \
git \
chromium \
ttf-freefont
# Copy files
COPY rootfs /
@@ -102,7 +103,8 @@ WORKDIR /var/www/app
# Do not remove this ENV
ENV IS_DOCKER true
RUN /usr/local/bin/composer install --no-dev --quiet
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
# Override the environment settings from projects .env file
ENV APP_ENV production

View File

@@ -1 +1 @@
Fri Jul 2 7:33:22 +00 2021
Fri Jul 4 7:33:22 +00 2023

View File

@@ -27,6 +27,7 @@ docker_process_init_files() {
php artisan config:cache
php artisan optimize
php artisan package:discover
php artisan ninja:react
# Check if DB works, if not crash the app.

18
config/php/php-cli.ini Normal file
View File

@@ -0,0 +1,18 @@
session.auto_start = Off
short_open_tag = Off
error_reporting = E_ALL & ~E_NOTICE & ~E_WARNING & ~E_STRICT & ~E_DEPRECATED
; opcache.enable_cli=1
; opcache.fast_shutdown=1
; opcache.memory_consumption=256
; opcache.interned_strings_buffer=8
; opcache.max_accelerated_files=4000
; opcache.revalidate_freq=60
; # http://symfony.com/doc/current/performance.html
; realpath_cache_size = 4096K
; realpath_cache_ttl = 600
memory_limit = 2G
post_max_size = 60M
upload_max_filesize = 50M

21
config/php/php.ini Normal file
View File

@@ -0,0 +1,21 @@
session.auto_start = Off
short_open_tag = Off
error_reporting = E_ALL & ~E_NOTICE & ~E_WARNING & ~E_STRICT & ~E_DEPRECATED
; opcache.enable=1
; opcache.preload=/srv/www/invoiceninja/current/preload.php
; opcache.preload_user=www-data
; ; The OPcache shared memory storage size.
; opcache.max_accelerated_files=300000
; opcache.validate_timestamps=1
; opcache.revalidate_freq=30
; opcache.jit_buffer_size=256M
; opcache.jit=1205
; opcache.memory_consumption=1024M
post_max_size = 60M
upload_max_filesize = 50M
memory_limit=512M

View File

@@ -30,6 +30,9 @@ services:
- ./config/hosts:/etc/hosts:ro
- ./docker/app/public:/var/www/app/public:rw,delegated
- ./docker/app/storage:/var/www/app/storage:rw,delegated
- ./config/php/php.ini:/usr/local/etc/php/php.ini
- ./config/php/php-cli.ini:/usr/local/etc/php/php-cli.ini
depends_on:
- db
networks: