]> git.xonotic.org Git - xonotic/xonstat.git/blob - production.ini
Add those settings to the sample INI files.
[xonotic/xonstat.git] / production.ini
1 [app:XonStat]
2 use                  =  egg:XonStat
3 reload_templates     =  false
4 debug_authorization  =  false
5 debug_notfound       =  false
6 debug_routematch     =  false
7 debug_templates      =  false
8 default_locale_name  =  en
9 sqlalchemy.url       =  postgresql+psycopg2://xonstat:PASSWORD@localhost:5432/xonstatdb
10 mako.directories     =  xonstat:templates
11
12 # Beaker cache settings
13 # Default is to use one region with hourly cache invalidation
14 cache.regions             =  hourly_term
15 cache.type                =  memory
16 cache.hourly_term.expire  =  3600
17
18 # XonStat-specific settings. See development.ini for their descriptions.
19 xonstat.minimum_required_players     = 2
20 xonstat.leaderboard_lifetime         = 7
21 xonstat.verify_requests              = true
22 xonstat.servers.leaderboard_lifetime = 30
23 xonstat.servers.leaderboard_count    = 10
24 xonstat.servers.index_count          = 20
25 xonstat.servers.recent_games_count   = 20
26
27 [filter:weberror]
28 use   = egg:WebError#error_catcher
29 debug = false
30
31 [pipeline:main]
32 pipeline =
33     XonStat
34
35 [server:main]
36 # Gunicorn settings. See http://docs.gunicorn.org/en/19.3/configure.html.
37 use               =  egg:gunicorn#main
38 user              =  xonstat
39 group             =  xonstat
40 proc_name         =  xonstat
41 daemon            =  True
42 bind              =  0.0.0.0:6543
43 workers           =  4
44 max_requests      =  5000
45 timeout           =  30
46 graceful_timeout  =  30
47 pidfile           =  /tmp/xonstat.pid
48 loglevel          =  INFO
49 accesslog         =  ~/xonstat/xonstat_access.log
50 errorlog          =  ~/xonstat/xonstat.log
51
52 # Begin logging configuration
53
54 [loggers]
55 keys = root, xonstat, sqlalchemy
56
57 [handlers]
58 keys = console
59
60 [formatters]
61 keys = generic
62
63 [logger_root]
64 level    = WARN
65 handlers = console, error_file
66
67 [logger_xonstat]
68 level    = WARN
69 handlers =
70 qualname = xonstat
71
72 [logger_sqlalchemy]
73 # INFO logs SQL queries, DEBUG logs queries and results, and WARN logs neither
74 level = WARN
75 handlers =
76 qualname = sqlalchemy.engine
77
78 [handler_console]
79 class     = StreamHandler
80 args      = (sys.stderr,)
81 level     = NOTSET
82 formatter = generic
83
84 [handler_error_file]
85 class     = logging.handlers.RotatingFileHandler
86 formatter = generic
87 args      = ('~/xonstat/xonstat.log', 'a', 50000000, 5)
88
89 [formatter_generic]
90 format = %(asctime)s %(levelname)-5.5s [%(name)s][%(threadName)s] %(message)s
91
92 # End logging configuration