-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathconfig.example.py
64 lines (53 loc) · 2.18 KB
/
config.example.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
import logging
# App settings. Debug and testing should be set to "False" in production, and
# the secret key should be randomized. It's not used *yet*, but it may be in
# the future.
DEBUG = True
TESTING = True
SECRET_KEY = "SUPERSECRET"
# Whether to always cache servers. This has no effect if CACHE_PATCHED is False.
CACHE_ALWAYS = False
# Whether to only cache patched(servers with a Modifier) servers.
CACHE_PATCHED = True
# Webserver Settings
HTTP_HOST = '0.0.0.0'
HTTP_PORT = 80
# Monog connection URI
MONGO_URI = 'mongodb://localhost:27017/'
# Mongo database name to use
MONGO_DB = 'gdn'
# Rate limit tuple in the format <number of requests>, <minutes interval>.
# Or, False if you do not want any rate limiting.
RATE_LIMIT = 1000, 60
# List of enabled strategies. "find" is the default, public-safe one. You can
# also use "aggregate", which allows you to directly pipe data into the mongo
# aggregation pipeline, see:
#
# http://docs.mongodb.org/manual/reference/operator/aggregation/
#
# There is a also "rawfind" that pushes data directly into mongo's find().
# However, NO VALIDATION IS DONE ON THIS INPUT and therefore it is not
# recommended to allow these strategies on public instances.
ENABLED_STRATEGIES = ['find']
# Number of seconds to keep usage records for.
KEEP_USAGE_FOR = 60 * 60 * 24 * 7
# The "key" needed to access private routes. This should be passed as a GET or
# POST parameter. Uncomment it to enable the private key and private routes.
# PRIVATE_KEY = 'verySeekrit'
# Whether IP/agent stats should be collected and displayed publicly.
COLLECT_STATS = True
# Number of records to return per page on request
PAGE_LENGTH = 100
# Raven DSN. If False, Raven handler will not be enabled. See getsentry.com
# if you would like to use this. It's fantasic!
RAVEN_DSN = False
# Level of error message which will be logged to Raven
RAVEN_LEVEL = logging.WARN
# Level of events which should be logged to the log/gdn.log file.
LOG_LEVEL = logging.INFO
# How large the log should get before being rotated. Default: 100 MB
LOG_ROTATION_SIZE = 2 << 20
# Number of log rotations to keep
LOG_ROTATION_BACKUP = 5
# Format of the console and file log
LOG_FORMAT = '[%(asctime)s][%(levelname)s] %(message)s'