Dockerfile
Dockerfile copied to clipboard
how to increase upload_max_filesize on php-apache image
Hi there, I'm using https://github.com/webdevops/Dockerfile/tree/5fca0e66f2af9f06d04fa778281fb886e67d434f/docker/php-apache/7.4/conf Dockerfile/docker/php-apache/7.4/conf/
I don't see any config for PHP on the that.
I'm wondering how can I increase upload_max_filesize
?
thanks
Hi You can use env file to achieve that like this.
inside docker-compose file, add env_file to www part:
www:
depends_on:
- mysql
- mail
image: webdevops/php-apache:7.4
volumes:
- "./www:/var/www/html"
ports:
- 8080:80
env_file:
- .env
then inside .env file you can increase upload_max_filesize and other settings like this:
upload_max_filesize=64M
post_max_size=64M
max_execution_time=100
memory_limit=128M
Good luck
HI @alizamani
thank you very much for your attention and reply.
I don't have a docker-compose file ( because the image has been created for an Azure container base).
The specific question is how we can increase it in the docker build process not in compose step.
Thanks Yusef