mirror of
https://github.com/Cian-H/am-d-model.eu.git
synced 2025-12-22 21:41:57 +00:00
Aligned file handling settings between S3, API, and Caddy
This commit is contained in:
@@ -2,7 +2,6 @@
|
||||
admin off
|
||||
}
|
||||
|
||||
|
||||
am-d-model.eu {
|
||||
reverse_proxy site:3000 {
|
||||
health_uri /health
|
||||
@@ -18,7 +17,11 @@ invenio.am-d-model.eu {
|
||||
}
|
||||
root /static/* /opt/invenio/var/instance/static
|
||||
try_files {path} {path}/ /index.html
|
||||
reverse_proxy invenio-rdm:5000
|
||||
reverse_proxy invenio-rdm:5000 {
|
||||
transport http {
|
||||
response_header_timeout 5m
|
||||
}
|
||||
}
|
||||
file_server
|
||||
encode gzip
|
||||
}
|
||||
|
||||
@@ -199,16 +199,16 @@ INSTANCE_THEME_FILE = "./less/theme.less"
|
||||
# Invenio-Files-Rest
|
||||
# ==================
|
||||
FILES_REST_STORAGE_FACTORY = "invenio_s3.s3fs_storage_factory"
|
||||
FILES_REST_MAX_CONTENT_LENGTH = 1024**4 # 1TB
|
||||
FILES_REST_MULTIPART_CHUNKSIZE_MIN = 5 * 1024**2 # 5MB minimum
|
||||
FILES_REST_MULTIPART_MAX_PARTS = 250 # Allow more parts for large files
|
||||
RDM_FILES_DEFAULT_MAX_FILE_SIZE = 1024**4 # 1TB
|
||||
RDM_FILES_DEFAULT_QUOTA_SIZE = 1024**4 # 1TB
|
||||
FILES_REST_DEFAULT_MAX_FILE_SIZE = 1024**4 # 1TB
|
||||
FILES_REST_DEFAULT_QUOTA_SIZE = 1024**4 # 1TB
|
||||
FILES_REST_MAX_CONTENT_LENGTH = 5 * 1024**4 # 5 TB total
|
||||
FILES_REST_MULTIPART_CHUNKSIZE_MIN = 5 * 1024**2 # 5 MB (S3 minimum)
|
||||
FILES_REST_MULTIPART_MAX_PARTS = 10000 # Align with S3 limit
|
||||
RDM_FILES_DEFAULT_MAX_FILE_SIZE = 5 * 1024**4 # 5 TB
|
||||
RDM_FILES_DEFAULT_QUOTA_SIZE = 10 * 1024**4 # 10 TB
|
||||
FILES_REST_DEFAULT_MAX_FILE_SIZE = 5 * 1024**4 # 5 TB
|
||||
FILES_REST_DEFAULT_QUOTA_SIZE = 10 * 1024**4 # 10 TB
|
||||
APP_RDM_DEPOSIT_FORM_QUOTA = {
|
||||
"maxFiles": 250,
|
||||
"maxStorage": 1024**4, # 1TB
|
||||
"maxFiles": 500,
|
||||
"maxStorage": 10 * 1024**4, # 10 TB
|
||||
}
|
||||
|
||||
# Invenio-S3
|
||||
@@ -218,13 +218,13 @@ S3_ACCESS_KEY_ID = "CHANGE_ME"
|
||||
S3_SECRET_ACCESS_KEY = "CHANGE_ME"
|
||||
S3_REGION_NAME = "eu-west-1"
|
||||
S3_DIRECT_UPLOAD = True
|
||||
S3_MULTIPART_UPLOAD_THRESHOLD = 100 * 1024 * 1024 # 100MB
|
||||
S3_MULTIPART_UPLOAD_PART_SIZE = 100 * 1024 * 1024 # 100MB
|
||||
S3_MULTIPART_MAX_PARTS = 100000 # Max number of parts (allows up to ~10TB)
|
||||
S3_PRESIGNED_URL_EXPIRATION = 60 * 60 * 6 # 6 hours in seconds
|
||||
S3_MULTIPART_UPLOAD_THRESHOLD = 100 * 1024**2 # 100 MB
|
||||
S3_MULTIPART_UPLOAD_PART_SIZE = 525 * 1024**2 # 525 MB
|
||||
S3_MULTIPART_MAX_PARTS = 10000 # S3 limit
|
||||
S3_PRESIGNED_URL_EXPIRATION = 60 * 60 * 6 # 6 hours
|
||||
S3_CLIENT_CONFIG = {
|
||||
"connect_timeout": 120, # 2 minutes
|
||||
"read_timeout": 300, # 5 minutes
|
||||
"connect_timeout": 120,
|
||||
"read_timeout": 300,
|
||||
"max_pool_connections": 50,
|
||||
"retries": {"max_attempts": 10, "mode": "adaptive"},
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user