From 2f43d4b45afacb1253caadc5e322b537b6a52206 Mon Sep 17 00:00:00 2001 From: Benjamin Brummer Date: Sat, 4 Jan 2025 18:52:36 +0000 Subject: [PATCH 1/3] php.ini refactoring --- debian/php/php.ini | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/debian/php/php.ini b/debian/php/php.ini index 35c9074..a748d2f 100644 --- a/debian/php/php.ini +++ b/debian/php/php.ini @@ -1,15 +1,15 @@ [core] -# https://www.php.net/manual/en/ini.core.php -post_max_size = 10M -upload_max_filesize = 10M +; https://www.php.net/manual/en/ini.core.php +post_max_size=10M +upload_max_filesize=10M [opcache] -# https://www.php.net/manual/en/opcache.installation.php#opcache.installation.recommended +; https://www.php.net/manual/en/opcache.installation.php#opcache.installation.recommended opcache.enable_cli=1 opcache.max_accelerated_files=4000 opcache.revalidate_freq=60 [jit] -# https://wiki.php.net/rfc/jit_config_defaults +; https://wiki.php.net/rfc/jit_config_defaults opcache.jit=tracing opcache.jit_buffer_size=64M From 3c6ed5cda124d25be1a8713a5c8d9c664005ceb7 Mon Sep 17 00:00:00 2001 From: Benjamin Brummer Date: Sat, 4 Jan 2025 19:41:05 +0000 Subject: [PATCH 2/3] remove octane installation --- debian/Dockerfile | 2 -- 1 file changed, 2 deletions(-) diff --git a/debian/Dockerfile b/debian/Dockerfile index 9f089ea..e87abfd 100644 --- a/debian/Dockerfile +++ b/debian/Dockerfile @@ -14,8 +14,6 @@ RUN chmod -R a=r,u+w,a+X . # Install dependencies RUN composer install --no-dev --no-scripts --no-autoloader --ignore-platform-reqs -RUN composer require laravel/octane --ignore-platform-reqs - RUN composer dump-autoload --optimize RUN php artisan storage:link From 7870b345ed48d6e639efb517efd766a1790860e0 Mon Sep 17 00:00:00 2001 From: Benjamin Brummer Date: Sun, 5 Jan 2025 16:57:56 +0000 Subject: [PATCH 3/3] composer is not needed --- debian/Dockerfile | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/debian/Dockerfile b/debian/Dockerfile index e87abfd..ca29520 100644 --- a/debian/Dockerfile +++ b/debian/Dockerfile @@ -1,4 +1,4 @@ -FROM composer:latest AS composer +FROM dunglas/frankenphp:1-php8.3-bookworm AS prepare-app RUN curl -s "https://api.github.com/repos/invoiceninja/invoiceninja/releases/latest" | \ grep -o '"browser_download_url": "[^"]*invoiceninja.tar"' | \ @@ -11,11 +11,6 @@ RUN ln -s ./resources/views/react/index.blade.php ./public/index.html # Set permissions: directories 755, files 644 RUN chmod -R a=r,u+w,a+X . -# Install dependencies -RUN composer install --no-dev --no-scripts --no-autoloader --ignore-platform-reqs - -RUN composer dump-autoload --optimize - RUN php artisan storage:link # Octane @@ -93,7 +88,7 @@ ENTRYPOINT ["/usr/local/bin/init.sh"] CMD ["frankenphp", "php-cli", "artisan", "octane:frankenphp"] # InvoiceNinja -COPY --from=composer --chown=${user}:${user} /app /app +COPY --from=prepare-app --chown=${user}:${user} /app /app # Add initialization script COPY --chmod=0755 scripts/init.sh /usr/local/bin/init.sh