X-Git-Url: http://de.git.xonotic.org/?p=xonotic%2Fxonstat.git;a=blobdiff_plain;f=production.ini;h=a2da1cf785a9cb3b371955d2f5d1aa8418a7bdf8;hp=1acf5c82f7e50fbcb880b700e429df732db16441;hb=fb9ba80a3f845ee9e578b26867024823a24e5deb;hpb=816e0bc229bdac4ad124d524b33440c4a3018c92;ds=sidebyside diff --git a/production.ini b/production.ini index 1acf5c8..a2da1cf 100644 --- a/production.ini +++ b/production.ini @@ -1,52 +1,49 @@ [app:XonStat] -use = egg:XonStat -reload_templates = false -debug_authorization = false -debug_notfound = false -debug_routematch = false -debug_templates = false -default_locale_name = en -sqlalchemy.url = sqlite:///%(here)s/XonStat.db -mako.directories = xonstat:templates +use = egg:XonStat +reload_templates = false +debug_authorization = false +debug_notfound = false +debug_routematch = false +debug_templates = false +default_locale_name = en +sqlalchemy.url = postgresql+psycopg2://xonstat:PASSWORD@localhost:5432/xonstatdb +mako.directories = xonstat:templates # Beaker cache settings # Default is to use one region with hourly cache invalidation -cache.regions = hourly_term -cache.type = memory -cache.hourly_term.expire = 3600 +cache.regions = hourly_term +cache.type = memory +cache.hourly_term.expire = 3600 -xonstat.minimum_required_players = 2 -xonstat.leaderboard_lifetime = 7 -xonstat.verify_requests = true +# XonStat-specific settings. See development.ini for their descriptions. +xonstat.minimum_required_players = 2 +xonstat.leaderboard_lifetime = 7 +xonstat.verify_requests = true [filter:weberror] -use = egg:WebError#error_catcher +use = egg:WebError#error_catcher debug = false -;error_log = -;show_exceptions_in_wsgi_errors = true -;smtp_server = localhost -;error_email = janitor@example.com -;smtp_username = janitor -;smtp_password = "janitor's password" -;from_address = paste@localhost -;error_subject_prefix = "Pyramid Error" -;smtp_use_tls = -;error_message = - -[filter:tm] -use = egg:repoze.tm2#tm -commit_veto = repoze.tm:default_commit_veto [pipeline:main] pipeline = - weberror - tm XonStat [server:main] -use = egg:Paste#http -host = 0.0.0.0 -port = 6543 +# Gunicorn settings. See http://docs.gunicorn.org/en/19.3/configure.html. +use = egg:gunicorn#main +user = xonstat +group = xonstat +proc_name = xonstat +daemon = True +bind = 0.0.0.0:6543 +workers = 4 +max_requests = 5000 +timeout = 30 +graceful_timeout = 30 +pidfile = /tmp/xonstat.pid +loglevel = INFO +accesslog = ~/xonstat/xonstat_access.log +errorlog = ~/xonstat/xonstat.log # Begin logging configuration @@ -60,27 +57,30 @@ keys = console keys = generic [logger_root] -level = WARN -handlers = console +level = WARN +handlers = console, error_file [logger_xonstat] -level = WARN +level = WARN handlers = qualname = xonstat [logger_sqlalchemy] +# INFO logs SQL queries, DEBUG logs queries and results, and WARN logs neither level = WARN handlers = qualname = sqlalchemy.engine -# "level = INFO" logs SQL queries. -# "level = DEBUG" logs SQL queries and results. -# "level = WARN" logs neither. (Recommended for production systems.) [handler_console] -class = StreamHandler -args = (sys.stderr,) -level = NOTSET +class = StreamHandler +args = (sys.stderr,) +level = NOTSET +formatter = generic + +[handler_error_file] +class = logging.handlers.RotatingFileHandler formatter = generic +args = ('~/xonstat/xonstat.log', 'a', 50000000, 5) [formatter_generic] format = %(asctime)s %(levelname)-5.5s [%(name)s][%(threadName)s] %(message)s