import logging import datetime import os # General app configuration options APP_NAME = 'QUARTER_WEB' VERSION = '0.1.0' LOCAL_HOSTNAME = 'localhost' # TODO: This should be retrieved from the AWS instance name PUBLIC_HOSTNAME = 'localhost' SECRET_KEY = os.environ.get('SECRET_KEY', 'ThisIsASecret') # Mongo configuration options MONGODB_DB = os.environ.get('MONGODB_DATABASE', 'quarter') MONGODB_HOST = os.environ.get('MONGODB_HOST', 'quarter_mongodb') MONGODB_PORT = int(os.environ.get('MONGODB_PORT', 27017)) MONGODB_USERNAME = os.environ.get('MONGODB_USERNAME', 'quarter') MONGODB_PASSWORD = os.environ.get('MONGODB_PASSWORD', 'quarter').replace('"', '') MONGODB_CONNECT = False # Flask-Static-Digest config FLASK_STATIC_DIGEST_URL = 'apply/' # JWT configuration options JWT_SECRET_KEY = SECRET_KEY JWT_ACCESS_TOKEN_EXPIRES = datetime.timedelta(hours=1) JWT_REFRESH_TOKEN_EXPIRES = datetime.timedelta(days=1) JWT_TOKEN_LOCATION = ['headers', 'cookies'] JWT_HEADER_NAME = 'Auth-Token' JWT_COOKIE_CSRF_PROTECT = False JWT_CLEANUP_MULE_SLEEP_SECS = datetime.timedelta(minutes=30).seconds # CORS configuration options CORS_SUPPORTS_CREDENTIALS = True CORS_ORIGINS = [ 'http://127.0.0.1:5000', 'http://127.0.0.1', 'http://localhost:5000', 'http://localhost', 'https://www.apply.quarterhomes.com', 'https://apply.qaurterhomes.com', 'http://apply.qaurterhomes.com', 'http://www.quarterhomes.com', 'https://www.quarterhomes.com', 'http://qhome2.strassner.com' ] CORS_RESOURCES = r'/api/*' # Swagger config options SWAGGER_UI_DOC_EXPANSION = 'list' RESTX_MASK_SWAGGER = False # logging configuration options LOG_LEVEL = logging.INFO LOG_PATH = os.path.join('/var/log/www/quarter.log') # Mail configuration options MAIL_USERNAME = os.environ.get('MAIL_USERNAME', 'noreply@quarterhomes.com') # Password reset config options PASSWORD_RESET_EXP_SEC = datetime.timedelta(minutes=10).seconds # Email confirmation options CONFIRM_EMAIL_EXP_SEC = datetime.timedelta(minutes=15).seconds