23 lines
915 B
Python
23 lines
915 B
Python
import os
|
|
|
|
class Config:
|
|
# sentry stuff
|
|
SENTRY_DSN = os.environ.get("SENTRY_DSN")
|
|
RELEASE_ID = os.environ.get("RELEASE_ID", "test")
|
|
RELEASEMODE = os.environ.get("RELEASEMODE", "dev")
|
|
|
|
# configure flask app
|
|
SQLALCHEMY_DATABASE_URI = os.environ.get('DATABASE_URI', "sqlite://") # Default to memory db
|
|
MINIO_ENDPOINT = os.environ['MINIO_ENDPOINT']
|
|
MINIO_ACCESS_KEY = os.environ['MINIO_ACCESS_KEY']
|
|
MINIO_SECRET_KEY = os.environ['MINIO_SECRET_KEY']
|
|
MINIO_SVM_BUCKET_NAME = os.environ.get('MINIO_SVM_BUCKET_NAME', 'svm')
|
|
MINIO_CNN_BUCKET_NAME = os.environ.get('MINIO_CNN_BUCKET_NAME', 'cnn')
|
|
MINIO_SECURE = os.environ.get('MINIO_SECURE', False)
|
|
MINIO_REGION = os.environ.get('MINIO_REGION', None)
|
|
|
|
# important stuff
|
|
SECRET_KEY = os.environ.get('SECRET_KEY', os.urandom(12))
|
|
# disable this for better performance
|
|
SQLALCHEMY_TRACK_MODIFICATIONS = False
|