allow setting upload_max_filesize by docker environment variable, see #915

This commit is contained in:
Shish 2023-06-27 01:55:32 +01:00
parent 16dc8dffce
commit cad3357e38
2 changed files with 4 additions and 3 deletions

View file

@ -42,7 +42,8 @@ FROM debian:bookworm
EXPOSE 8000 EXPOSE 8000
HEALTHCHECK --interval=1m --timeout=3s CMD curl --fail http://127.0.0.1:8000/ || exit 1 HEALTHCHECK --interval=1m --timeout=3s CMD curl --fail http://127.0.0.1:8000/ || exit 1
ENV UID=1000 \ ENV UID=1000 \
GID=1000 GID=1000 \
UPLOAD_MAX_FILESIZE=50M
RUN apt update && apt upgrade -y && apt install -y \ 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}-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 \ php${PHP_VERSION}-pgsql php${PHP_VERSION}-mysql php${PHP_VERSION}-sqlite3 \

View file

@ -6,7 +6,7 @@ chown $UID:$GID /app/data
export PHP_CLI_SERVER_WORKERS=8 export PHP_CLI_SERVER_WORKERS=8
exec /usr/local/bin/su-exec shimmie:shimmie \ exec /usr/local/bin/su-exec shimmie:shimmie \
/usr/bin/php \ /usr/bin/php \
-d upload_max_filesize=50M \ -d upload_max_filesize=$UPLOAD_MAX_FILESIZE \
-d post_max_size=50M \ -d post_max_size=$UPLOAD_MAX_FILESIZE \
-S 0.0.0.0:8000 -q \ -S 0.0.0.0:8000 -q \
tests/router.php tests/router.php