aboutsummaryrefslogtreecommitdiff
path: root/config.env.py
blob: 8334eebed22cc3fafc9894314b664ecef550962c (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
"""
Default configuration settings and environment variable based configuration logic
    See the readme for more information
"""

from os import environ
import secrets

# Flask config
DEBUG = False
IP = environ.get('POLLER_IP', 'localhost')
PORT = environ.get('POLLER_PORT', '8000')
PROTOCOL = environ.get('POLLER_PROTOCOL', 'http://')
SECRET_KEY = environ.get('POLLER_SECRET_KEY', default=''.join(secrets.token_hex(16)))

# SQLAlchemy config
SQLALCHEMY_DATABASE_URI = environ.get('POLLER_DATABASE_URI', 'sqlite:////tmp/rit-covid-poller.db')
SQLALCHEMY_TRACK_MODIFICATIONS = False