linuxserver / docker-snipe-it

Alpine/Nginx container for the Asset Management software Snipe-IT
GNU General Public License v3.0
123 stars 26 forks source link

PHP uploaded file size limit raise #29

Closed imifarago closed 2 years ago

imifarago commented 2 years ago

linuxserver.io



Description:

Modify upload_max_filesize and post_max_size in php from environment variable on container start.

Benefits of this PR and context:

If you have to upload bigger files than 2M (default value) you can't do this at the moment. A better image about the asset or a pdf/manual could be stored there.

How Has This Been Tested?

Built the image locally and started it with the new environment variables. After this, checked the ini_get("upload_max_filesize") and ini_get("post_max_size") values, and it's changed. Also could upload bigger file in the application. Tested on Arch Linux with Docker 20.10.10

LinuxServer-CI commented 2 years ago

I am a bot, here are the test results for this PR: https://ci-tests.linuxserver.io/lspipepr/snipe-it/v5.3.0-pkg-e5fb5131-pr-29/index.html https://ci-tests.linuxserver.io/lspipepr/snipe-it/v5.3.0-pkg-e5fb5131-pr-29/shellcheck-result.xml

aptalca commented 2 years ago

Those values are already customizable via /config/php/php-local.ini

imifarago commented 2 years ago

Yep, but I thought to config via env instead of mount file

github-actions[bot] commented 2 years ago

This pull request has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

thelamer commented 2 years ago

https://github.com/linuxserver/docker-snipe-it/pull/36 will include docs on achieving this as @aptalca said we have an override file for this. I understand the want to use an ENV var for this, but our nginx base image is meant to be mostly configured from files in /config not env vars.