From 7104b2107db592756f4090ba772869eb86d6a44f Mon Sep 17 00:00:00 2001 From: jfriedli Date: Fri, 27 Mar 2020 10:59:16 -0700 Subject: file removal background job --- README.md | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) (limited to 'README.md') diff --git a/README.md b/README.md index e8dfe03..22ff44d 100644 --- a/README.md +++ b/README.md @@ -52,7 +52,11 @@ Note that you can add multiple hosts from which you want to accept API requests. a space. **IMPORTANT:** The default value if the variable is not set is: `Access-Control-Allow-Origin: *` -Configure another environment variable: `MAT2_MAX_FILES_BULK_DOWNLOAD=10` +Configure the following environment variables: + + - `MAT2_MAX_FILES_BULK_DOWNLOAD=10` Max number of files that can be grouped for a bulk download. + - `MAT2_MAX_FILE_AGE_FOR_REMOVAL=900` Seconds a file in the upload folder is kept. + After that it will be deleted. Default `15 * 60` This specifies the max number of files that can be bulk downloaded using the api. Note: Each file has a max file size of 16mb @@ -66,10 +70,6 @@ systemctl restart nginx/apache/… It should now be working. -You should add `find /var/www/mat2-web/uploads/ -type f -mtime +1 -exec rm {} \;` -in a crontab to remove files that people might have uploaded but never -downloaded. - # Deploy via Ansible If you happen to be using [Ansible](https://www.ansible.com/), there's an @@ -92,10 +92,6 @@ https://0xacab.org/jvoisin/mat2-web/container_registry Example: `docker run -p 80:80 -d -e MAT2_ALLOW_ORIGIN_WHITELIST='https://myhost1.org' registry.0xacab.org/jvoisin/mat2-web:latest` -Make sure to add -`find /var/www/mat2-web/uploads/ -type f -mtime +1 -exec rm {} \;` as cron job -run inside the container. - # Development Install docker and docker-compose and then run `docker-compose up` to setup the docker dev environment. Mat2-web is now accessible on your host machine at `localhost:5000`. -- cgit v1.3