-
Notifications
You must be signed in to change notification settings - Fork 73
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Make max. upload size configurable via env variable #36
Comments
I had a short discussion with @tianon about this in IRC. Instead of making it configurable I opted for a sane higher limit by default. The issue here is not „I need to easily change the values across my fleet“, the issue is „I want to upload large files“. Adding a redundant configuration knob via an environment variable makes both the image itself as well as setting up the container more complex. Adding this bit to the README increases the noise for next to no benefit. The updated values in #37 should allow for any use cases that are reasonably handled by PHP, while still preventing stupid mistakes. If you need to import your 5 gigabyte SQL dump you are free to use the well known php.ini path to increase the values or you should simply use the MySQL CLI interface. |
I have a similar issue with |
@travisghansen Makes sense. Re-opening. Feel free to propose a PR with a limit that suits your needs, otherwise I'll do when I get around to it. Regarding the generic way to override: You are able to set specific ini settings on the command line using |
@TimWolla yeah understood. I can think of several ways to approach it. We could do We could introduce a If I put together an MR do you have a preferred approach? Any of the above or something different altogether? |
My preferred approach would be: Hardcode some sane limit, like I did in #37. The default for Anything else can be done by a child image or by bind mounting an .ini file to |
For posterity, even though @TimWolla expressed his concern that adding an environment variable will make Docker image more "complex", while somewhat true, people should be able to decide if they're going to make stupid decisions for themselves, not being stopped from doing so by anyone with an opinion out there. That being said, environment variables aren't necessary as entrypoint command can be overriden with the following:
Tried in Kubernetes cluster just now, worked fine. |
The current upload restriction of 2 MB is pretty low. I suggest to introduce another environment variable to configure the max. upload filesize.
I know that we can use the workaround shown in #17. But this is such an essential setting that you should not have to create a custom config file to change it. Users of this image don't want to mess around with PHP settings - all they want is a quick admin panel for their database.
The text was updated successfully, but these errors were encountered: