portfolio / portfolio-webapp / config / default.cfg
default.cfg
Raw
import os
from pytz import timezone
from pathlib import Path

DEBUG = False
LOCAL_MODE = False
SCHEME = 'https'
PREFERRED_URL_SCHEME = 'https'
PORT = 5000
DOMAIN = os.environ.get('DOMAIN', 'lorenzow.com')
ROOT_URL = f'www.{DOMAIN}'
DEV_ENV = bool(int(os.environ.get('DEV_ENV', 0)))
SECRET_KEY = os.environ.get('FLASK_SECRET_KEY')
SQLALCHEMY_TRACK_MODIFICATIONS = False
REPO_ROOT = Path(__file__).parent.parent


"""
DATABASE
"""
DB_HOST = os.environ.get('MYSQL_DB_HOST', 'localhost')
DB_PORT = os.environ.get('MYSQL_DB_PORT', 3306)
DB_USER = os.environ.get('MYSQL_DB_USER', 'root')
DB_PASS = os.environ.get('MYSQL_DB_PSWD', '')
DB_NAME = os.environ.get('MYSQL_DB_NAME', 'portfolio')
SQLALCHEMY_DATABASE_URI = 'mysql+pymysql://{0}:{1}@{2}:{3}/{4}?charset=utf8mb4'.format(DB_USER, DB_PASS, DB_HOST, DB_PORT, DB_NAME)


"""
AWS
"""
#AWS_DEFAULT_BUCKET = os.environ.get('AWS_DEFAULT_BUCKET')
#AWS_ACCESS_KEY = os.environ.get('AWS_ACCESS_KEY')
#AWS_SECRET_KEY = os.environ.get('AWS_SECRET_KEY')
#AWS_CLOUDFRONT_DISTRIBUTION_ID = os.environ.get('AWS_CLOUDFRONT_DISTRIBUTION_ID')
#AWS_CLOUDFRONT_REGION = os.environ.get('AWS_CLOUDFRONT_REGION')
#CLOUDFRONT_CACHE_SIGNED_URLS = bool(int(os.environ.get('CLOUDFRONT_CACHE_SIGNED_URLS', 1)))

"""
COMMUNICATIONS
"""
# Uncomment if needed
# TWILIO_SID = os.environ.get('TWILIO_SID')
# TWILIO_AUTH_TOKEN = os.environ.get('TWILIO_AUTH_TOKEN')
# TWILIO_NUMBER = os.environ.get('TWILIO_NUMBER')
# TWILIO_HEADER = os.environ.get('TWILIO_HEADER')
# SENDGRID_API_KEY = os.environ.get('SENDGRID_API_KEY')
SYSTEM_EMAIL = f'noreply@{DOMAIN}'     # The 'from' email of auto-notification emails
DEFAULT_EMAIL = 'lorenzowaguespack@gmail.com'  # All emails sent out in local mode will go to this email
DEV_EMAIL = 'lorenzowaguespack@gmail.com'      # Email to which to send error reports, logs, etc.
OVERRIDE_ALL_EMAIL = os.environ.get('OVERRIDE_ALL_EMAIL', None)
CONTACT_SUBMISSION_TO_EMAIL = 'lorenzowaguespack@gmail.com'


"""
MISC
"""
TIMEZONE = timezone('US/Eastern') # Default timezone for display
BRANDING = os.environ.get('BRANDING', "Lorenzo's Portfolio")