52 lines
1.7 KiB
Python
52 lines
1.7 KiB
Python
|
|
|
|
import os
|
|
from dotenv import load_dotenv
|
|
|
|
# Load environment variables from .env file
|
|
load_dotenv()
|
|
|
|
class ApplicationConfig:
|
|
"""
|
|
Basic Configuration for a generic User
|
|
"""
|
|
CURRENT_SETTINGS = 'LOCAL'
|
|
# databases info
|
|
POSTGRES_USERNAME = 'postgres'
|
|
POSTGRES_PW = 'password'
|
|
POSTGRES_SERVER = '192.168.1.204'
|
|
POSTGRES_PORT = '5432'
|
|
POSTGRES_DBNAME00 = 'auburnoil'
|
|
SQLALCHEMY_DATABASE_URI = "postgresql+psycopg2://{}:{}@{}/{}".format(POSTGRES_USERNAME,
|
|
POSTGRES_PW,
|
|
POSTGRES_SERVER,
|
|
POSTGRES_DBNAME00
|
|
)
|
|
|
|
SQLALCHEMY_BINDS = {'auburnoil': SQLALCHEMY_DATABASE_URI}
|
|
|
|
|
|
origins = [
|
|
"http://192.168.1.204:9000",
|
|
"http://192.168.1.204:9613",
|
|
"http://192.168.1.204:9614",
|
|
"http://192.168.1.204:9612",
|
|
"http://192.168.1.204:9611",
|
|
]
|
|
|
|
# VoIP.ms Credentials and Settings
|
|
voipms_api_username = os.environ.get('VOIPMS_API_USERNAME')
|
|
voipms_api_password = os.environ.get('VOIPMS_API_PASSWORD')
|
|
|
|
# Target DID and Destinations
|
|
target_did = os.environ.get('TARGET_DID')
|
|
target_sip_account = os.environ.get('TARGET_SIP_ACCOUNT')
|
|
target_cellphone_1 = os.environ.get('TARGET_CELLPHONE_1')
|
|
target_cellphone_2 = os.environ.get('TARGET_CELLPHONE_2')
|
|
|
|
# VoIP.ms API endpoint
|
|
voipms_api_url = os.environ.get('VOIPMS_API_URL', "https://voip.ms/api/v1/rest.php")
|
|
|
|
# Create a single instance of the settings to be used throughout the app
|
|
settings = ApplicationConfig()
|