oshipka/bootstrap/config.py

32 lines
985 B
Python
Raw Permalink Normal View History

2020-03-18 10:59:37 +01:00
import os
basepath = os.path.dirname(os.path.realpath(__file__))
DATA_DIR = os.path.join(basepath, "data")
2020-05-05 15:50:35 +02:00
STATIC_DATA_DIR = os.path.join(basepath, "data_static")
2020-03-23 14:59:11 +01:00
2020-06-21 11:17:34 +02:00
MEDIA_DIR = os.path.join(DATA_DIR, "media")
2020-03-23 14:59:11 +01:00
TASKS_DIR = os.path.join(DATA_DIR, "tasks")
TASKS_IN_DIR = os.path.join(TASKS_DIR, "in")
TASKS_BUF_DIR = os.path.join(TASKS_DIR, "buf")
TASKS_PROC_DIR = os.path.join(TASKS_DIR, "proc")
2020-03-18 10:59:37 +01:00
DATABASE_FILE = os.path.join(DATA_DIR, "db.sqlite")
SQLALCHEMY_DATABASE_URI = 'sqlite:///{}'.format(DATABASE_FILE)
2020-03-23 14:59:11 +01:00
2020-05-02 13:40:29 +02:00
SEARCH_INDEX_PATH = os.path.join(DATA_DIR, "search_index")
2020-03-18 12:32:40 +01:00
TEMPLATES_FOLDER = os.path.join(basepath, "webapp", "templates")
2020-03-25 16:23:24 +01:00
STATIC_FOLDER = os.path.join(basepath, "webapp", "static")
2020-03-23 14:59:11 +01:00
2020-03-18 10:59:37 +01:00
MAKEDIRS = [
DATA_DIR, STATIC_DATA_DIR, MEDIA_DIR, TASKS_DIR, TASKS_IN_DIR, TASKS_PROC_DIR, TASKS_BUF_DIR,
2020-03-23 14:59:11 +01:00
]
2021-05-09 00:05:26 +02:00
PORT = 5000
APP_BASE_URL = "https://PROJECT_NAME.localhost:{}".format(PORT)
2021-05-09 14:44:11 +02:00
SECURITY_ENABLED = True
2021-05-09 17:07:34 +02:00
SSO_BASE_URL = 'https://sso.localhost:5008'
SSO_CLIENT_ID = APP_BASE_URL