##
## Fedora Community Production configuration
##
## $Id: fedoracommunity-prod.ini.erb,v 1.0 2009/05/03 23:38:07 johnp Exp $
##

[DEFAULT]
profile = false
debug = false
profile.connectors = false
profile.dir = /var/log/fedoracommunity/profile

# This is required to avoid a 404 error on, e.g. /packages/python-webob1.2
disable_request_extensions = True

#email_to = lmacken@redhat.com rbean@redhat.com
#smtp_server = gateway
#error_email_from = fedoracommunity@fedoraproject.org

fedoracommunity.extensions_dir = {{ pythonsitelib }}/fedoracommunity/plugins/extensions

fedoracommunity.script_name = /packages
fedoracommunity.connector.kojihub.baseurl = https://koji{{env_suffix}}.fedoraproject.org/kojihub
fedoracommunity.connector.bodhi.baseurl = https://bodhi{{env_suffix}}.fedoraproject.org/
fedoracommunity.connector.mdapi.baseurl = https://apps{{env_suffix}}.fedoraproject.org/mdapi
fedoracommunity.connector.fas.baseurl = https://admin{{env_suffix}}.fedoraproject.org/accounts/
fedoracommunity.connector.icons.baseurl = http://dl-iad05.fedoraproject.org/pub/alt/screenshots
{% if env == "staging" %}
fedoracommunity.connector.bugzilla.baseurl = https://bugzilla.stage.redhat.com/xmlrpc.cgi
{% else %}
fedoracommunity.connector.bugzilla.baseurl = https://bugzilla.redhat.com/xmlrpc.cgi
{% endif %}
fedoracommunity.connector.bugzilla.cookiefile = /var/cache/fedoracommunity/bugzillacookies
fedoracommunity.connector.xapian.package-search.db = /var/cache/fedoracommunity/packages/xapian/search

fedoracommunity.resource_path_prefix = /packages/_res/

# Git settings
git_repo_path = /var/cache/fedoracommunity/git.fedoraproject.org

# FAS is locked down so we need a minimal user inorder to get public user info
# to unauthenticated users.  You need to get a locked down account for this
# and fill in the user info here.  Never check this file into git  with
# this information filled in
fedoracommunity.connector.fas.minimal_user_name={{ fcommFasUser }}
fedoracommunity.connector.fas.minimal_user_password={{ fcommFasPassword }} 

# This is insecure, use only for testing
fedora.clients.check_certs = True

# URL for getting message history
{% if env == "staging" %}
datagrepper_url = https://apps.stg.fedoraproject.org/datagrepper/raw
{% else %}
datagrepper_url = https://apps.fedoraproject.org/datagrepper/raw
{% endif %}

##
## Moksha-specific configuration options
##

# Where to store the feed caches.
#
{% if env == "staging" %}
feed_cache = postgres://fedoracommunity:{{ fcommFeedCacheDBPassword }}@db-community.stg/fedoracommunity_feed_cache
{% else %}
feed_cache = postgres://fedoracommunity:{{ fcommFeedCacheDBPassword }}@db-community/fedoracommunity_feed_cache
{% endif %}

#
# Feed Streamer settings
#
# Max age (in seconds) of each feed in the cache
feed.max_age = 900

# Timeout in seconds for the web request
feed.timeout = 30

# The number of simultaneous connections
feed.deferred_groups = 10

# Where to initialize and store our application databases.  %s is the app name.
app_db = sqlite:///%s.db

# The location of our Orbited server
orbited_host = localhost
orbited_port = 9000

# Stomp broker configuration.
stomp_broker = localhost
stomp_port = 61613
stomp_user = guest
stomp_pass = guest

# Optional AMQP Broker.
#amqp_broker = guest/guest@localhost

# Documentation directory
docs_dir = /srv/moksha/docs

# Moksha chat configuration

# Use a built-in IRC server
#chat.backend = irc://localhost:9999
#chat.builtin = true
#chat.backend = irc://irc.freenode.net:6667
#chat.rooms = default
#chat.default.staticRoomName = moksha
#chat.default.roomAssignmentMode = static
#chat.default.display.greeting = Moksha Chat
#chat.default.display.floating = true
#chat.default.display.floatingToggle = false
#chat.default.display.width = 400
#chat.default.display.height = 300
#chat.default.display.theme = simple
#chat.default.display.resizable = true

moksha.extensionpoints=True
moksha.csrf_protection = False
moksha.csrf.login_handler = /login_handler
moksha.csrf.trusted_domains = admin.fedoraproject.org

moksha.use_tw2 = True
moksha.livesocket = False

cache.bugzilla.backend=dogpile.cache.memcached
cache.bugzilla.expiration_time=300
cache.bugzilla.arguments.url=memcached02:11211
cache.bugzilla.arguments.distributed_lock=False
cache.connectors.backend=dogpile.cache.memcached
cache.connectors.expiration_time=300
cache.connectors.arguments.url=memcached02:11211
cache.connectors.arguments.distributed_lock=False

[server:main]
use = egg:Paste#http
host = 0.0.0.0
port = 8080

[app:main]
use = egg:fedoracommunity
full_stack = true
#lang = ru
#cache_dir = /var/cache/fedoracommunity/data
beaker.session.key = fedoracommunity
beaker.session.secret = {{ fcommBeakerSessionSecret }}

beaker.cache.type = ext:memcached
beaker.cache.url = memcached01:11211
beaker.cache.lock_dir = /var/cache/fedoracommunity/beaker

# If you'd like to fine-tune the individual locations of the cache data dirs
# for the Cache data, or the Session saves, un-comment the desired settings
# here:
#beaker.cache.data_dir = %(here)s/data/cache
#beaker.session.data_dir = %(here)s/data/sessions

# pick the form for your database
# %(here) may include a ':' character on Windows environments; this can
# invalidate the URI when specifying a SQLite db via path name
sqlalchemy.url=postgres://moksha:m0ksh4@localhost/moksha
# sqlalchemy.url=mysql://username:password@hostname:port/databasename

# If you have sqlite, here's a simple default to get you started
# in development

#sqlalchemy.url = sqlite:///%(here)s/devdata.db
sqlalchemy.echo = true
sqlalchemy.echo_pool = false
sqlalchemy.pool_recycle = 3600

sqlalchemy.pool_size=1
sqlalchemy.max_overflow=2

# WARNING: *THE LINE BELOW MUST BE UNCOMMENTED ON A PRODUCTION ENVIRONMENT*
# Debug mode will enable the interactive debugging tool, allowing ANYONE to
# execute malicious code after an exception is raised.
set debug = false

# Logging configuration
# Add additional loggers, handlers, formatters here
# Uses python's logging config file format
# http://docs.python.org/lib/logging-config-fileformat.html

[loggers]
keys = root, moksha, sqlalchemy, tg, auth, pylons

[handlers]
keys = console

[formatters]
keys = generic

# If you create additional loggers, add them as a key to [loggers]
[logger_root]
level = WARN
handlers = console

[logger_moksha]
level = WARN
handlers =
qualname = moksha

[logger_tg]
level = WARN
handlers =
qualname = tg

# repoze.who is noisy by default
[logger_auth]
level = WARN
handlers =
qualname = auth

[logger_pylons]
level = WARN
handlers =
qualname = pylons

[logger_sqlalchemy]
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.)

# If you create additional handlers, add them as a key to [handlers]
[handler_console]
class = StreamHandler
args = (sys.stderr,)
level = NOTSET
formatter = generic

# If you create additional formatters, add them as a key to [formatters]
[formatter_generic]
format = %(asctime)s,%(msecs)03d %(levelname)-5.5s [%(name)s] %(message)s
datefmt = %H:%M:%S
