0
Answered

Increasing upload size - Docker install

david 4 months ago updated by Vlad R 4 months ago 1

I've got a Docker install of Filerun, and it's working well in general. However, I can't upload files greater than 20MB. This is undoubtedly due to the maximum filesize set in php.ini:

I've had this issue previously when using other php-based file sites. However, the fix I have used for them is not working for Filerun. In my docker-compose directory, I add a php-ini file with the following lines:

post_max_size = 8G
upload_max_filesize = 8G

Then I modify my docker-compose.yml file as follows:

version: '2'

services:
db:
image: mariadb:10.1
environment:
MYSQL_ROOT_PASSWORD: <removed>
MYSQL_USER: <removed>
MYSQL_PASSWORD: <removed>
MYSQL_DATABASE: <removed>
volumes:
- /filerun/db:/var/lib/mysql

web:
image: afian/filerun
environment:
FR_DB_HOST: db
FR_DB_PORT: 3306
FR_DB_NAME: <removed>
FR_DB_USER: <removed>
FR_DB_PASS: <removed>
APACHE_RUN_USER: www-data
APACHE_RUN_USER_ID: 33
APACHE_RUN_GROUP: www-data
APACHE_RUN_GROUP_ID: 33
PHP_INI_SCAN_DIR: "/usr/local/etc/php/custom.d:/usr/local/etc/php/conf.d"
depends_on:
- db
links:
- db:db
ports:
- "127.0.0.1:8096:80"
volumes:
- /filerun/html:/var/www/html
- /filerun/user-files:/user-files
- ./php-ini:/usr/local/etc/php/conf.d/custom.ini


The custom ini file is being correctly added to the container, but isn't being picked up by PHP. Can someone recommend a fix? Is Filerun doing something different with the php configuration that would mean it's not being read?

Any help appreciated.

Answer

Answer
Answered
This is undoubtedly due to the maximum filesize set in php.ini

No, it is not. The "post_max_size" and "upload_max_filesize" PHP configuration does not affect the maximum upload file size in FileRun. They only affect the size of the chunks FileRun uploads the larger files by. Increasing to 8G is not recommended, as that would disable FileRun's ability of resuming interrupted larger uploads, and most probably have you hit other limitations.

If you are using a standard FileRun Docker image and have troubles uploading, it comes from something else, maybe your firewall or reverse proxy, not from FileRun.

Answer
Answered
This is undoubtedly due to the maximum filesize set in php.ini

No, it is not. The "post_max_size" and "upload_max_filesize" PHP configuration does not affect the maximum upload file size in FileRun. They only affect the size of the chunks FileRun uploads the larger files by. Increasing to 8G is not recommended, as that would disable FileRun's ability of resuming interrupted larger uploads, and most probably have you hit other limitations.

If you are using a standard FileRun Docker image and have troubles uploading, it comes from something else, maybe your firewall or reverse proxy, not from FileRun.