From cad3357e38bb75abff14ef51026190985ebddcc5 Mon Sep 17 00:00:00 2001 From: Shish Date: Tue, 27 Jun 2023 01:55:32 +0100 Subject: [PATCH] allow setting upload_max_filesize by docker environment variable, see #915 --- Dockerfile | 3 ++- tests/docker-init.sh | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index e16a871f..40eda60d 100644 --- a/Dockerfile +++ b/Dockerfile @@ -42,7 +42,8 @@ FROM debian:bookworm EXPOSE 8000 HEALTHCHECK --interval=1m --timeout=3s CMD curl --fail http://127.0.0.1:8000/ || exit 1 ENV UID=1000 \ - GID=1000 + GID=1000 \ + UPLOAD_MAX_FILESIZE=50M RUN apt update && apt upgrade -y && apt install -y \ php${PHP_VERSION}-cli php${PHP_VERSION}-gd php${PHP_VERSION}-zip php${PHP_VERSION}-xml php${PHP_VERSION}-mbstring \ php${PHP_VERSION}-pgsql php${PHP_VERSION}-mysql php${PHP_VERSION}-sqlite3 \ diff --git a/tests/docker-init.sh b/tests/docker-init.sh index 05add5c8..94cc64c9 100644 --- a/tests/docker-init.sh +++ b/tests/docker-init.sh @@ -6,7 +6,7 @@ chown $UID:$GID /app/data export PHP_CLI_SERVER_WORKERS=8 exec /usr/local/bin/su-exec shimmie:shimmie \ /usr/bin/php \ - -d upload_max_filesize=50M \ - -d post_max_size=50M \ + -d upload_max_filesize=$UPLOAD_MAX_FILESIZE \ + -d post_max_size=$UPLOAD_MAX_FILESIZE \ -S 0.0.0.0:8000 -q \ tests/router.php