summaryrefslogtreecommitdiff
path: root/cli/app/settings/app_cfg.py
diff options
context:
space:
mode:
Diffstat (limited to 'cli/app/settings/app_cfg.py')
-rw-r--r--cli/app/settings/app_cfg.py15
1 files changed, 12 insertions, 3 deletions
diff --git a/cli/app/settings/app_cfg.py b/cli/app/settings/app_cfg.py
index 5fc4982..4aa4bee 100644
--- a/cli/app/settings/app_cfg.py
+++ b/cli/app/settings/app_cfg.py
@@ -15,9 +15,10 @@ codecs.register(lambda name: codecs.lookup('utf8') if name == 'utf8mb4' else Non
LOG = logging.getLogger('swimmer')
# -----------------------------------------------------------------------------
-# .env config for keys
+# .env config
# -----------------------------------------------------------------------------
# Project directory
+
SELF_CWD = os.path.dirname(os.path.realpath(__file__)) # this file
DIR_PROJECT_ROOT = str(Path(SELF_CWD).parent.parent.parent)
@@ -31,13 +32,13 @@ load_dotenv(dotenv_path=fp_env)
# -----------------------------------------------------------------------------
CLICK_GROUPS = {
- # 'process': 'commands/process',
'site': 'commands/site',
+ 'admin': 'commands/admin',
'db': '',
'flask': '',
+ 'demo': '',
}
-
# -----------------------------------------------------------------------------
# File I/O
# -----------------------------------------------------------------------------
@@ -63,6 +64,13 @@ DIR_STATIC = join(DIR_APP, 'static')
HASH_TREE_DEPTH = 3 # for sha256 subdirs
HASH_BRANCH_SIZE = 3 # for sha256 subdirs
+DIR_PUBLIC_EXPORTS = os.getenv('DIR_PUBLIC_EXPORTS') or DIR_EXPORTS
+
+# -----------------------------------------------------------------------------
+# Database
+# -----------------------------------------------------------------------------
+
+USE_SQLITE = os.getenv("USE_SQLITE") == "True"
# -----------------------------------------------------------------------------
# S3 storage
@@ -78,6 +86,7 @@ except Exception as e:
# -----------------------------------------------------------------------------
SERVER_NAME = os.getenv('SERVER_NAME') or '0.0.0.0:5000'
+DEMO_SERVER_NAME = os.getenv('DEMO_SERVER_NAME') or '0.0.0.0:3000'
HTTP_EXTERNAL_HOST = os.getenv('HTTP_EXTERNAL_HOST') or f"http://{SERVER_NAME}"
# -----------------------------------------------------------------------------