Fixed setup if no config directory exists

Remove temp files after upload
Set temp directory for docker to data directory by default #37
Increase default memory to 40
Added TMPDIR env
Update doc
This commit is contained in:
Marc Ole Bulling
2022-01-01 21:01:39 +01:00
parent 7d47744a20
commit 4eb609ece9
6 changed files with 60 additions and 33 deletions
+20 -13
View File
@@ -57,19 +57,26 @@ Available environment variables
==================================
+---------------------+------------------------------------------------------------------+-------------+----------------+
| Name | Action | Persistent* | Default |
+=====================+==================================================================+=============+================+
| GOKAPI_CONFIG_DIR | Sets the directory for the config file | No | config |
+---------------------+------------------------------------------------------------------+-------------+----------------+
| GOKAPI_CONFIG_FILE | Sets the name of the config file | No | config.json |
+---------------------+------------------------------------------------------------------+-------------+----------------+
| GOKAPI_DATA_DIR | Sets the directory for the data | Yes | data |
+---------------------+------------------------------------------------------------------+-------------+----------------+
| GOKAPI_LENGTH_ID | Sets the length of the download IDs. Value needs to be 5 or more | Yes | 15 |
+---------------------+------------------------------------------------------------------+-------------+----------------+
| GOKAPI_MAX_FILESIZE | Sets the maximum allowed file size in MB | Yes | 102400 (100GB) |
+---------------------+------------------------------------------------------------------+-------------+----------------+
+--------------------------+------------------------------------------------------------------------------+-------------+-----------------------------+
| Name | Action | Persistent* | Default |
+==========================+==============================================================================+=============+=============================+
| GOKAPI_CONFIG_DIR | Sets the directory for the config file | No | config |
+--------------------------+------------------------------------------------------------------------------+-------------+-----------------------------+
| GOKAPI_CONFIG_FILE | Sets the name of the config file | No | config.json |
+--------------------------+------------------------------------------------------------------------------+-------------+-----------------------------+
| GOKAPI_DATA_DIR | Sets the directory for the data | Yes | data |
+--------------------------+------------------------------------------------------------------------------+-------------+-----------------------------+
| GOKAPI_LENGTH_ID | Sets the length of the download IDs. Value needs to be 5 or more | Yes | 15 |
+--------------------------+------------------------------------------------------------------------------+-------------+-----------------------------+
| GOKAPI_MAX_FILESIZE | Sets the maximum allowed file size in MB | Yes | 102400 (100GB) |
+--------------------------+------------------------------------------------------------------------------+-------------+-----------------------------+
| GOKAPI_MAX_MEMORY_UPLOAD | Sets the amount of RAM in MB that can be allocated for an upload. | Yes | 20 |
| | Any upload with a size greater than that will be written to a temporary file | | |
+--------------------------+------------------------------------------------------------------------------+-------------+-----------------------------+
| TMPDIR | Sets the path which contains temporary files | No | Non-Docker: Default OS path |
| | | | Docker: [DATA_DIR] |
+--------------------------+------------------------------------------------------------------------------+-------------+-----------------------------+
\* Variables that are persistent must be submitted during the first start when Gokapi creates a new config file. They can be omitted afterwards. Non-persistent variables need to be set on every start.