diff options
Diffstat (limited to 'README.md')
| -rw-r--r-- | README.md | 14 |
1 files changed, 5 insertions, 9 deletions
| @@ -52,7 +52,11 @@ Note that you can add multiple hosts from which you want to accept API requests. | |||
| 52 | a space. | 52 | a space. |
| 53 | **IMPORTANT:** The default value if the variable is not set is: `Access-Control-Allow-Origin: *` | 53 | **IMPORTANT:** The default value if the variable is not set is: `Access-Control-Allow-Origin: *` |
| 54 | 54 | ||
| 55 | Configure another environment variable: `MAT2_MAX_FILES_BULK_DOWNLOAD=10` | 55 | Configure the following environment variables: |
| 56 | |||
| 57 | - `MAT2_MAX_FILES_BULK_DOWNLOAD=10` Max number of files that can be grouped for a bulk download. | ||
| 58 | - `MAT2_MAX_FILE_AGE_FOR_REMOVAL=900` Seconds a file in the upload folder is kept. | ||
| 59 | After that it will be deleted. Default `15 * 60` | ||
| 56 | 60 | ||
| 57 | This specifies the max number of files that can be bulk downloaded using the api. | 61 | This specifies the max number of files that can be bulk downloaded using the api. |
| 58 | Note: Each file has a max file size of 16mb | 62 | Note: Each file has a max file size of 16mb |
| @@ -66,10 +70,6 @@ systemctl restart nginx/apache/… | |||
| 66 | 70 | ||
| 67 | It should now be working. | 71 | It should now be working. |
| 68 | 72 | ||
| 69 | You should add `find /var/www/mat2-web/uploads/ -type f -mtime +1 -exec rm {} \;` | ||
| 70 | in a crontab to remove files that people might have uploaded but never | ||
| 71 | downloaded. | ||
| 72 | |||
| 73 | # Deploy via Ansible | 73 | # Deploy via Ansible |
| 74 | 74 | ||
| 75 | If you happen to be using [Ansible](https://www.ansible.com/), there's an | 75 | 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 | |||
| 92 | Example: | 92 | Example: |
| 93 | `docker run -p 80:80 -d -e MAT2_ALLOW_ORIGIN_WHITELIST='https://myhost1.org' registry.0xacab.org/jvoisin/mat2-web:latest` | 93 | `docker run -p 80:80 -d -e MAT2_ALLOW_ORIGIN_WHITELIST='https://myhost1.org' registry.0xacab.org/jvoisin/mat2-web:latest` |
| 94 | 94 | ||
| 95 | Make sure to add | ||
| 96 | `find /var/www/mat2-web/uploads/ -type f -mtime +1 -exec rm {} \;` as cron job | ||
| 97 | run inside the container. | ||
| 98 | |||
| 99 | # Development | 95 | # Development |
| 100 | Install docker and docker-compose and then run `docker-compose up` to setup | 96 | Install docker and docker-compose and then run `docker-compose up` to setup |
| 101 | the docker dev environment. Mat2-web is now accessible on your host machine at `localhost:5000`. | 97 | the docker dev environment. Mat2-web is now accessible on your host machine at `localhost:5000`. |
