36 lines
1.1 KiB
Python
36 lines
1.1 KiB
Python
import os
|
|
|
|
|
|
class ApplicationConfig:
|
|
"""
|
|
Production Configuration
|
|
"""
|
|
CURRENT_SETTINGS = 'PRODUCTION'
|
|
|
|
# Database credentials from environment variables
|
|
POSTGRES_USERNAME = os.environ.get('POSTGRES_USERNAME', 'postgres')
|
|
POSTGRES_PW = os.environ.get('POSTGRES_PW')
|
|
POSTGRES_SERVER = os.environ.get('POSTGRES_SERVER', '192.168.1.204')
|
|
POSTGRES_PORT = os.environ.get('POSTGRES_PORT', '5432')
|
|
POSTGRES_DBNAME00 = os.environ.get('POSTGRES_DBNAME', 'auburnoil')
|
|
|
|
SQLALCHEMY_DATABASE_URI = "postgresql+psycopg2://{}:{}@{}/{}".format(
|
|
POSTGRES_USERNAME,
|
|
POSTGRES_PW,
|
|
POSTGRES_SERVER,
|
|
POSTGRES_DBNAME00
|
|
)
|
|
SQLALCHEMY_BINDS = {'auburnoil': SQLALCHEMY_DATABASE_URI}
|
|
|
|
origins = [
|
|
"https://oil.edwineames.com",
|
|
"https://apiauto.edwineames.com",
|
|
]
|
|
|
|
# Authorize.net credentials from environment variables
|
|
API_LOGIN_ID = os.environ.get('AUTHORIZE_API_LOGIN_ID')
|
|
TRANSACTION_KEY = os.environ.get('AUTHORIZE_TRANSACTION_KEY')
|
|
|
|
# Payment processing flags
|
|
penny_test_transaction = False # Skip penny test in production
|