d3d3/config.py

44 lines
1.3 KiB
Python

#! /usr/bin/env python
# -*- coding: utf-8 -*-
# vim:fenc=utf-8:ts=8:et:sw=4:sts=4
#
# Copyright © 2015 jpk <jpk@thor>
#
# Distributed under terms of the MIT license.
import os
SECRET_KEY = 'RANDOM KEY'
API_KEY = 'RANDOM KEY'
BOOTSTRAP_SERVE_LOCAL = False
BASEDIR = os.path.abspath(os.path.dirname(__file__))
DIRS = {'static': os.path.join(BASEDIR, 'flask_d3d3/static'),
'media': os.path.join(BASEDIR, 'flask_d3d3/media'),
'log': os.path.join(BASEDIR, 'log')}
#: Hostname of the MongoDB instance to store the historic profile data
MONGO_HOST = 'localhost'
#: Port of the MongoDB instance to store the historic profile data
MONGO_PORT = 27017
#: Database of the MongoDB instance to store the historic profile data
MONGO_DBNAME = 'd3progress'
#: Mongoalchemy databse setup: Database name
MONGOALCHEMY_DATABASE = 'd3d3'
#: Mongoalchemy databse setup: Database hostname
MONGOALCHEMY_SERVER = MONGO_HOST
#: Mongoalchemy databse setup: Server requires authentication?
MONGOALCHEMY_SERVER_AUTH = False
#: flask_cache default timeout for the cache
CACHE_DEFAULT_TIMEOUT = 3 * 60 * 60
#: flask_cache memcached servers
CACHE_MEMCACHED_SERVERS = ['localhost:11211']
CELERY_BROKER_URL = 'redis://localhost:6379/0'
CELERY_RESULT_BACKEND = 'redis://localhost:6379/0'
CRON_ALLOWED_HOSTS = ['127.0.0.1', '10.8.0.50', '5.135.164.160']