diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index 455a8766..124216d0 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -28,6 +28,7 @@ "UID": "2000", "GID": "2000", "UPLOAD_MAX_FILESIZE": "50M", + "MAX_FILE_UPLOADS": "100", "INSTALL_DSN": "sqlite:data/shimmie.dev.sqlite" }, "customizations": { diff --git a/.docker/entrypoint.d/config.json.tmpl b/.docker/entrypoint.d/config.json.tmpl index d1088d6e..b353e5b9 100644 --- a/.docker/entrypoint.d/config.json.tmpl +++ b/.docker/entrypoint.d/config.json.tmpl @@ -57,6 +57,7 @@ "options": { "admin": { "memory_limit": "256M", + "max_file_uploads": "$MAX_FILE_UPLOADS", "upload_max_filesize": "$UPLOAD_MAX_FILESIZE", "post_max_size": "$UPLOAD_MAX_FILESIZE" } diff --git a/.docker/entrypoint.sh b/.docker/entrypoint.sh index 16ada386..0ed83e6f 100755 --- a/.docker/entrypoint.sh +++ b/.docker/entrypoint.sh @@ -12,7 +12,7 @@ chown shimmie:shimmie /app/data rm -rf /var/lib/unit/* -envsubst '$UPLOAD_MAX_FILESIZE' < /app/.docker/entrypoint.d/config.json.tmpl > /app/.docker/entrypoint.d/config.json +envsubst < /app/.docker/entrypoint.d/config.json.tmpl > /app/.docker/entrypoint.d/config.json WAITLOOPS=5 SLEEPSEC=1 diff --git a/Dockerfile b/Dockerfile index f4d83d91..a9b7b984 100644 --- a/Dockerfile +++ b/Dockerfile @@ -68,7 +68,7 @@ FROM base AS run EXPOSE 8000 # HEALTHCHECK --interval=1m --timeout=3s CMD curl --fail http://127.0.0.1:8000/ || exit 1 ARG BUILD_TIME=unknown BUILD_HASH=unknown -ENV UID=1000 GID=1000 UPLOAD_MAX_FILESIZE=50M +ENV UID=1000 GID=1000 UPLOAD_MAX_FILESIZE=50M MAX_FILE_UPLOADS=100 COPY --from=build /app /app WORKDIR /app RUN echo "_d('BUILD_TIME', '$BUILD_TIME');" >> core/sys_config.php && \