From 9c51895f7bb0b9cfd0613d1863f0d709108c6364 Mon Sep 17 00:00:00 2001 From: Thorsten Hack Date: Mon, 26 Aug 2024 16:28:09 +0200 Subject: [PATCH 1/2] Add JPEG support to dockerfile --- CHANGELOG.md | 1 + Dockerfile | 1 + 2 files changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7fc3485be..9ee0664af 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,6 @@ ## next bugfix release (4.0.1) - [Docker] Support ARM64 architecture ([PR#130](https://github.com/mapbender/mapbender-starter/pull/130)) +- [Docker] Add JPEG support ([PR#132](https://github.com/mapbender/mapbender-starter/pull/132)) - Ignore deprecation notices in production logs ([PR#131](https://github.com/mapbender/mapbender-starter/pull/131)) ## v4.0.0 diff --git a/Dockerfile b/Dockerfile index d0bbc8aa6..ff902a621 100644 --- a/Dockerfile +++ b/Dockerfile @@ -22,6 +22,7 @@ RUN apt-get update && apt-get install -y \ && rm -rf /var/lib/apt/lists/* RUN docker-php-ext-install pdo_pgsql +RUN docker-php-ext-configure gd --with-jpeg --with-freetype RUN docker-php-ext-install curl gd intl mbstring zip bz2 xml pdo_sqlite ldap RUN docker-php-ext-install opcache From 09e9898ca3c059e40e8cf87d5991c94a2a0fcf93 Mon Sep 17 00:00:00 2001 From: Thorsten Hack Date: Mon, 26 Aug 2024 16:45:02 +0200 Subject: [PATCH 2/2] Add php.ini to Dockerfile --- CHANGELOG.md | 2 +- Dockerfile | 1 + docker/php.ini | 22 ++++++++++++++++++++++ 3 files changed, 24 insertions(+), 1 deletion(-) create mode 100644 docker/php.ini diff --git a/CHANGELOG.md b/CHANGELOG.md index 9ee0664af..4b8189313 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,6 @@ ## next bugfix release (4.0.1) - [Docker] Support ARM64 architecture ([PR#130](https://github.com/mapbender/mapbender-starter/pull/130)) -- [Docker] Add JPEG support ([PR#132](https://github.com/mapbender/mapbender-starter/pull/132)) +- [Docker] Add JPEG support and modify php.ini ([PR#132](https://github.com/mapbender/mapbender-starter/pull/132)) - Ignore deprecation notices in production logs ([PR#131](https://github.com/mapbender/mapbender-starter/pull/131)) ## v4.0.0 diff --git a/Dockerfile b/Dockerfile index ff902a621..bbca52ce1 100644 --- a/Dockerfile +++ b/Dockerfile @@ -28,6 +28,7 @@ RUN docker-php-ext-install opcache RUN rm /etc/apache2/sites-enabled/* COPY ./docker/mapbender_apache.conf /etc/apache2/sites-enabled/ +COPY ./docker/php.ini /usr/local/etc/php/php.ini RUN sed -ri -e 's!80!8080!g' /etc/apache2/ports.conf RUN a2enmod rewrite remoteip diff --git a/docker/php.ini b/docker/php.ini new file mode 100644 index 000000000..fec7b5ee2 --- /dev/null +++ b/docker/php.ini @@ -0,0 +1,22 @@ +max_input_vars = 8000 +expose_php = Off +error_reporting = E_ALL ^ E_NOTICE +display_errors = Off +log_errors = On +error_log = /dev/stderr +date.timezone = UTC +allow_url_fopen = On +post_max_size = 32M +upload_max_filesize = 32M +opcache.max_accelerated_files = 7963 +opcache.validate_timestamps = On +opcache.revalidate_freq = 2 +# to support Symfony annotations +opcache.save_comments = 1 +opcache.load_comments = 1 +opcache.fast_shutdown = 1 +opcache.enable_file_override = Off +memory_limit = 1536M +max_execution_time = 360 +sys_temp_dir = /tmp +session.gc_maxlifetime = 4800