diff --git a/.env.default b/.env.default index 117e077..23cffb6 100644 --- a/.env.default +++ b/.env.default @@ -14,6 +14,8 @@ AE_LOG_LVL=warning # Python loglevel: warning, info, debug, etc OSIT_WEB_HTTP_PORT=8080 OSIT_WEB_HTTPS_PORT=4443 +# Max body size is for nginx gunicorn apps (AE app and AE API) +OSIT_WEB_MAX_BODY_SIZE=5120M # For now this extra host variable is important for the AE Flask app to connect to the AE FastAPI API. DOCKER_AE_SERVER_EXTRA_HOST=test.oneskyit.com:192.168.32.20 @@ -97,3 +99,5 @@ AE_APP_LOG_PATH="/logs/aether_app.log" AE_APP_WORKERS=1 AE_APP_THREADS=1 AE_APP_RELOAD=True +# Generate a new key with: # python -c 'import os; print(os.urandom(16))' +AE_APP_CACHE_SECRET_KEY="$\x93\x12\xb4R\x80R\xb5\xe50\xa0k\xc8#RN" \ No newline at end of file diff --git a/conf/aether_app_config.py b/conf/aether_app_config.py index abb53fe..89792ff 100644 --- a/conf/aether_app_config.py +++ b/conf/aether_app_config.py @@ -14,7 +14,7 @@ ENV = 'development' # None, 'backup', 'default', 'development', 'production', 't DEBUG = True TESTING = True -SECRET_KEY = '\x08}\xe1q?\xb2\x16o9\xf1\x1d\xc7\xa8\xfb!\xff' # Generate a new key with: # python -c 'import os; print(os.urandom(16))' +SECRET_KEY = os.getenv('AE_APP_CACHE_SECRET_KEY', None) # Generate a new key with: # python -c 'import os; print(os.urandom(16))' # SESSION_COOKIE_NAME = 'session' # SESSION_COOKIE_DOMAIN = '.onesky.com' @@ -38,7 +38,7 @@ SESSION_REFRESH_EACH_REQUEST = True # SERVER_NAME = '' # UPLOAD_FOLDER = '' -MAX_CONTENT_LENGTH = 5120 * 1024 * 1024 # 5 GB +# MAX_CONTENT_LENGTH = 5120 * 1024 * 1024 # 5 GB SEND_FILE_MAX_AGE_DEFAULT = 3 # default 43200 (in seconds), 1800 = 30 minutes diff --git a/conf/nginx/site-enabled_aether_api_v5_fastapi_gunicorn.conf b/conf/nginx/site-enabled_aether_api_v5_fastapi_gunicorn.conf index 512219f..c816daf 100644 --- a/conf/nginx/site-enabled_aether_api_v5_fastapi_gunicorn.conf +++ b/conf/nginx/site-enabled_aether_api_v5_fastapi_gunicorn.conf @@ -13,7 +13,7 @@ server { access_log /logs/nginx/access_fastapi_gunicorn.log; error_log /logs/nginx/error_fastapi_gunicorn.log; - client_max_body_size 5120M; #4096M or 4G; 5120M or 5G; + client_max_body_size ${OSIT_WEB_MAX_BODY_SIZE}; # 5120M; #4096M or 4G; 5120M or 5G; location / { proxy_set_header Host $http_host; @@ -87,7 +87,7 @@ server { # include brotli.conf; # include gzip.conf; - client_max_body_size 5120M; #4096M or 4G; 5120M or 5G; + client_max_body_size ${OSIT_WEB_MAX_BODY_SIZE}; # 5120M; #4096M or 4G; 5120M or 5G; location / { proxy_set_header Host $http_host; diff --git a/conf/nginx/site-enabled_aether_fastapi_gunicorn.conf b/conf/nginx/site-enabled_aether_fastapi_gunicorn.conf index f8a6f5b..7c9dc93 100644 --- a/conf/nginx/site-enabled_aether_fastapi_gunicorn.conf +++ b/conf/nginx/site-enabled_aether_fastapi_gunicorn.conf @@ -13,7 +13,7 @@ server { access_log /logs/nginx/access_fastapi_gunicorn.log; error_log /logs/nginx/error_fastapi_gunicorn.log; - client_max_body_size 5120M; #4096M or 4G; 5120M or 5G; + client_max_body_size ${OSIT_WEB_MAX_BODY_SIZE}; # 5120M; #4096M or 4G; 5120M or 5G; location / { proxy_set_header Host $http_host; @@ -87,7 +87,7 @@ server { # include brotli.conf; # include gzip.conf; - client_max_body_size 5120M; #4096M or 4G; 5120M or 5G; + client_max_body_size ${OSIT_WEB_MAX_BODY_SIZE}; # 5120M; #4096M or 4G; 5120M or 5G; location / { proxy_set_header Host $http_host; diff --git a/conf/nginx/site-enabled_aether_flask_gunicorn.conf b/conf/nginx/site-enabled_aether_flask_gunicorn.conf index 5060f6f..f124581 100644 --- a/conf/nginx/site-enabled_aether_flask_gunicorn.conf +++ b/conf/nginx/site-enabled_aether_flask_gunicorn.conf @@ -31,7 +31,7 @@ server { access_log /logs/nginx/access_flask_gunicorn.log; error_log /logs/nginx/error_flask_gunicorn.log; - client_max_body_size 5120M; #4096M or 4G; 5120M or 5G; + client_max_body_size ${OSIT_WEB_MAX_BODY_SIZE}; # 5120M; #4096M or 4G; 5120M or 5G; location / { proxy_set_header Host $http_host; @@ -97,7 +97,7 @@ server { # include brotli.conf; # include gzip.conf; - client_max_body_size 5120M; #4096M or 4G; 5120M or 5G; + client_max_body_size ${OSIT_WEB_MAX_BODY_SIZE}; # 5120M; #4096M or 4G; 5120M or 5G; location / { proxy_set_header Host $http_host;