# http://gunicorn-docs.readthedocs.org/en/latest/configure.html#configuration-file
# -*-python-*-

import multiprocessing, os

os.environ['API_URL'] = 'http://localhost:5000'
os.environ['POSTGRES_DSN'] = 'user=postgres dbname=elections'
os.environ['GOOGLE_API_KEY'] = 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'
os.environ['MAPBOX_API_KEY'] = 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'
os.environ['IPSTACK_API_KEY'] = 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'
os.environ['ENABLE_FEATURE_APPLE_WALLET'] = '0'
os.environ['ENABLE_FEATURE_GOOGLE_GEOCODE'] = '0'
os.environ['ENABLE_FEATURE_POLLING_PLACE_DISTANCE'] = '0'

bind = "0.0.0.0:%s" % os.getenv('PORT', 5000)
workers = multiprocessing.cpu_count() * 2 + 1
worker_class = "gunicorn.workers.ggevent.GeventWorker"
pidfile = "/run/gunicorn/pid"
