From 93fdd38bde6a91afd98f6c22ed1bc7610d7c2ba4 Mon Sep 17 00:00:00 2001 From: "marcel.kocisek" Date: Tue, 1 Jul 2025 13:34:56 +0200 Subject: [PATCH 1/2] Increase max size for diagnostic logs --- deployment/community/.env.template | 17 +++++++++----- deployment/enterprise/.env.template | 35 ++++++++++++++++++----------- server/mergin/config.py | 2 +- 3 files changed, 34 insertions(+), 20 deletions(-) diff --git a/deployment/community/.env.template b/deployment/community/.env.template index 4c8aa6aa..4526246e 100644 --- a/deployment/community/.env.template +++ b/deployment/community/.env.template @@ -1,17 +1,19 @@ # This file should contain a set of Mergin Maps configuration definitions along with their default values +# Required for access of your server from the internet in email links +#MERGIN_BASE_URL=http://localhost:5000 +MERGIN_BASE_URL=fixme.example.com -FLASK_APP=application +# fixme: administrator email address for notifications and application initialisation +CONTACT_EMAIL=admin@example.com -# Required for access of your server -#MERGIN_BASE_URL=http://localhost:5000 +# Flask application related + +FLASK_APP=application #DEBUG=FLASK_DEBUG | False FLASK_DEBUG=0 -#LOCAL_PROJECTS=os.path.join(config_dir, os.pardir, os.pardir, 'projects') # for local storage type -LOCAL_PROJECTS=/data - #MAINTENANCE_FILE=os.path.join(LOCAL_PROJECTS, 'MAINTENANCE') # locking file when backups are created MAINTENANCE_FILE=/data/MAINTENANCE @@ -104,6 +106,9 @@ MAIL_SUPPRESS_SEND=0 # data sync +#LOCAL_PROJECTS=os.path.join(config_dir, os.pardir, os.pardir, 'projects') # for local storage type +LOCAL_PROJECTS=/data + #BLACKLIST='.mergin/, .DS_Store, .directory' # cast=Csv() #FILE_EXPIRATION=48 * 3600 # for clean up of old files where diffs were applied, in seconds diff --git a/deployment/enterprise/.env.template b/deployment/enterprise/.env.template index 2c67d13c..d51226e3 100644 --- a/deployment/enterprise/.env.template +++ b/deployment/enterprise/.env.template @@ -1,26 +1,25 @@ # This file should contain a full set of Mergin Maps configuration # definitions along with their default values -FLASK_APP=application -GEODIFF_LOGGER_LEVEL=2 -CONTACT_EMAIL=fixme +# Base URL of your deployment, required for access of your server from the internet in email links +#MERGIN_BASE_URL=http://localhost:5000 +MERGIN_BASE_URL=fixme.example.com +# fixme: administrator email address for notifications and application initialisation +CONTACT_EMAIL=admin@example.com -# ALL VERSIONS ######################################################################################################### +# Flask application related -#DEBUG=FLASK_DEBUG | False +FLASK_APP=application +GEODIFF_LOGGER_LEVEL=2 -#LOCAL_PROJECTS=os.path.join(config_dir, os.pardir, os.pardir, 'projects') # for local storage type -LOCAL_PROJECTS=/data +#DEBUG=FLASK_DEBUG | False #MAINTENANCE_FILE=os.path.join(LOCAL_PROJECTS, 'MAINTENANCE') # locking file when backups are created MAINTENANCE_FILE=/data/MAINTENANCE #PROXY_FIX=True -#SECRET_KEY=NODEFAULT -SECRET_KEY=fix-me - #SWAGGER_UI=False # to enable swagger UI console (for test only) #TEMP_DIR=gettempdir() # trash dir for temp files being cleaned regularly @@ -28,9 +27,6 @@ TEMP_DIR=/data/tmp #TESTING=False -#USER_SELF_REGISTRATION=True - - # Mergin DB related #DB_APPLICATION_NAME=mergin @@ -59,10 +55,20 @@ DB_PORT=5432 # auth related +#USER_SELF_REGISTRATION=True + +#SECRET_KEY=NODEFAULT +SECRET_KEY=fix-me + #BEARER_TOKEN_EXPIRATION=3600 * 12 # in seconds +#SECURITY_BEARER_SALT=NODEFAULT SECURITY_BEARER_SALT=fixme + +#SECURITY_EMAIL_SALT=NODEFAULT SECURITY_EMAIL_SALT=fixme + +#SECURITY_PASSWORD_SALT=NODEFAULT SECURITY_PASSWORD_SALT=fixme #WTF_CSRF_ENABLED=True @@ -98,6 +104,9 @@ MAIL_USERNAME=fix-me # data sync +#LOCAL_PROJECTS=os.path.join(config_dir, os.pardir, os.pardir, 'projects') # for local storage type +LOCAL_PROJECTS=/data + #BLACKLIST='.mergin/, .DS_Store, .directory' # cast=Csv() #FILE_EXPIRATION=48 * 3600 # for clean up of old files where diffs were applied, in seconds diff --git a/server/mergin/config.py b/server/mergin/config.py index 8855b5a8..d3bc65dc 100644 --- a/server/mergin/config.py +++ b/server/mergin/config.py @@ -120,5 +120,5 @@ class Configuration(object): ), ) DIAGNOSTIC_LOGS_MAX_SIZE = config( - "DIAGNOSTIC_LOGS_MAX_SIZE", default=1024 * 1024, cast=int + "DIAGNOSTIC_LOGS_MAX_SIZE", default=10 * 1024 * 1024, cast=int ) From f363dcf66d20067adadc8267ab4692a645cf58a4 Mon Sep 17 00:00:00 2001 From: "marcel.kocisek" Date: Tue, 1 Jul 2025 13:43:47 +0200 Subject: [PATCH 2/2] fixme play --- deployment/enterprise/.env.template | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/deployment/enterprise/.env.template b/deployment/enterprise/.env.template index d51226e3..f51c8bef 100644 --- a/deployment/enterprise/.env.template +++ b/deployment/enterprise/.env.template @@ -58,7 +58,7 @@ DB_PORT=5432 #USER_SELF_REGISTRATION=True #SECRET_KEY=NODEFAULT -SECRET_KEY=fix-me +SECRET_KEY=fixme #BEARER_TOKEN_EXPIRATION=3600 * 12 # in seconds @@ -99,7 +99,7 @@ MAIL_SERVER=fixme #MAIL_USE_TLS=True #MAIL_USERNAME=NODEFAULT -MAIL_USERNAME=fix-me +MAIL_USERNAME=fixme # data sync