mirror of
https://github.com/snipe/snipe-it.git
synced 2025-10-29 19:31:41 +00:00
The Docker entrypoint scripts set values for the `upload_max_filesize` and `post_max_size` directives in `php.ini` based on the value of the `PHP_UPLOAD_LIMIT` environment variable, subject to the following restrictions: * Exactly one file matches `/etc/php/*/apache2/php.ini` (on Ubuntu) or `/etc/php*/php.ini` (on Alpine) - if, for example, more than one PHP package is installed in the base image, `PHP_UPLOAD_LIMIT` will not be honoured. * The `php.ini` file already sets a non-default value for the `upload_max_filesize` or `post_max_size` directives - this is currently the case for the configurations inherited from upstream, but is not guaranteed. If the default values are relied upon, `PHP_UPLOAD_LIMIT` will silently not be honoured (although the script output will claim that it is). Iterate over the lines outputted by `file(1)` so `PHP_UPLOAD_LIMIT` is honoured in all available `php.ini` files, and set `upload_max_filesize` and `post_max_size` regardless of whether they already have a value set.
See https://snipe-it.readme.io/docs/docker for Docker information