forked from ComputerScienceHouse/QuotefaultAPI
-
Notifications
You must be signed in to change notification settings - Fork 0
/
config.env.py
29 lines (24 loc) · 1.28 KB
/
config.env.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
import os
# Flask config
DEBUG = True
IP = os.environ.get('API_QUOTEFAULT_IP', '127.0.0.1')
PORT = os.environ.get('API_QUOTEFAULT_PORT', 8080)
SERVER_NAME = os.environ.get('API_QUOTEFAULT_SERVER_NAME', 'quotefault-api.csh.rit.edu')
# DB Info
SQLALCHEMY_DATABASE_URI = os.environ.get('SQLALCHEMY_DATABASE_URI', 'sqlite:///{}'.format(os.path.join(os.getcwd(), "data.db")))
#DB_HOST = os.environ.get('API_QUOTEFAULT_DB_HOST', 'mysql.csh.rit.edu')
#DB_USERNAME = os.environ.get('API_QUOTEFAULT_DB_USERNAME', 'quotefault')
#DB_NAME = os.environ.get('API_QUOTEFAULT_DB_NAME', 'quotefault')
#DB_PASSWORD = os.environ.get('API_QUOTEFAULT_DB_PASSWORD', '')
# Do not use connections to the database older than 500 seconds
SQLALCHEMY_POOL_RECYCLE = 500
# OpenID Connect SSO config
OIDC_ISSUER = os.environ.get('API_QUOTEFAULT_OIDC_ISSUER', 'https://sso.csh.rit.edu/auth/realms/csh')
OIDC_CLIENT_CONFIG = {
'client_id': os.environ.get('API_QUOTEFAULT_OIDC_CLIENT_ID', 'quotefault-api'),
'client_secret': os.environ.get('API_QUOTEFAULT_OIDC_CLIENT_SECRET', ''),
'post_logout_redirect_uris': [os.environ.get('API_QUOTEFAULT_OIDC_LOGOUT_REDIRECT_URI', 'https://quotefault-api.csh.rit.edu/logout')]
}
# LDAP config
LDAP_DN = os.environ.get('LDAP_BIND_DN', "")
LDAP_PW = os.environ.get('LDAP_BIND_PW', "")