;       Licensed to the Apache Software Foundation (ASF) under one
;       or more contributor license agreements.  See the NOTICE file
;       distributed with this work for additional information
;       regarding copyright ownership.  The ASF licenses this file
;       to you under the Apache License, Version 2.0 (the
;       "License"); you may not use this file except in compliance
;       with the License.  You may obtain a copy of the License at
;
;         http://www.apache.org/licenses/LICENSE-2.0
;
;       Unless required by applicable law or agreed to in writing,
;       software distributed under the License is distributed on an
;       "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
;       KIND, either express or implied.  See the License for the
;       specific language governing permissions and limitations
;       under the License.


; Copy this file to /allura-data/production.ini
;
; And then you MUST change several settings in here
;
; Find every reference of myexamplesite.com here and change it
; Also change:
;  site_name
;  smtp_server
;  session.jwt_secret_keys
;  session.secure
;  csp.form_action_urls
;  ming.main.encryption.kms_providers.local.key
;  ming.project.encryption.kms_providers.local.key
;  ming.task.encryption.kms_providers.local.key
;
; This file inherits settings from docker-dev.ini and development.ini
; You are free to make additional changes/additions to this file for other settings


[app:main]
;  this is a path within docker, thus it's just /allura
use = config:/allura/Allura/docker-dev.ini#main

; "set" must be used since we're inheriting with the "use" line above
set debug = false

; Used to uniquify references to static resources, can be a timestamp or any unique value
; This should be updated each time you deploy (or make significant changes, like new tools, new css)
; For example, when you deploy, run this:
;    sed -i.bak -e "s/^build_key=.*/build_key=`date +%s`/" your-production.ini
build_key=1276635823

; After you make "build_key" update for every deploy (see above), uncomment this line for static assets to cache for 1 year
;ew.cache_header_seconds = 31536000

base_url = https://myexamplesite.com
domain = myexamplesite.com
site_name = My Example Site
;force_ssl.pattern = .

; outgoing mail
; result of `ip addr show docker0`
; https://stackoverflow.com/questions/24319662/from-inside-of-a-docker-container-how-do-i-connect-to-the-localhost-of-the-mach
smtp_server = 172.17.0.1
smtp_port = 25
smtp_tls = true

forgemail.domain = .myexamplesite.com
forgemail.return_path = noreply@myexamplesite.com

session.jwt_secret_keys = d2de2cf67814d69691f77e390f14845aa5f5c8bb

auth.allow_birth_date = false
trovecategories.enableediting = admin

scm.repos.refresh_base_url = http://web:8080
scm.clonechoices.git = [{"name": "HTTPS", "key": "https", "title": "HTTPS"}]
scm.host.https.git = https://myexamplesite.com/git$path
;scm.host.rw.git = https://$username@myexamplesite.com/git$path
scm.repos.tarball.enable = false

jinja_bytecode_cache_type = filesystem
auto_reload_templates = false
lcd_timeout = 15
markdown_cache_threshold = .1
repo_refs_cache_threshold = .1

stats.sample_rate = .01



[app:task]
use = main
; TurboGears will use controllers/task.py as root controller
override_root = task



[loggers]
keys = root, allura, sqlalchemy, paste, ew, taskdstatus, timermiddleware, tmw_details

[handlers]
keys = console, taskdstatus, timermiddleware

[formatters]
keys = generic, timermiddleware

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

[logger_allura]
level = INFO
handlers =
qualname = allura

[logger_sqlalchemy]
level = INFO
handlers =
qualname = sqlalchemy.engine
; "level = INFO" logs SQL queries.
; "level = DEBUG" logs SQL queries and results.
; "level = WARN" logs neither.  (Recommended for production systems.)

[logger_paste]
level = INFO
qualname = paste
handlers =

[logger_ew]
; easy widgets
level = WARN
qualname = ew
handlers =

[logger_tmw_details]
; DEBUG will include every instrumented call in our logging
level = INFO
qualname = timermiddleware
handlers =

[logger_taskdstatus]
level = INFO
qualname = taskdstatus
handlers = taskdstatus

[logger_timermiddleware]
level = INFO
handlers = timermiddleware
qualname = stats
propagate = 0

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

[handler_taskdstatus]
class = handlers.WatchedFileHandler
args = ('taskd_status.log', 'a')
level = NOTSET
formatter = generic

[handler_timermiddleware]
class = handlers.WatchedFileHandler
; if you run 'gunicorn' in allura/Allura/ then that's where this file will be
; you may want to hard-code a specific directory here.
args = ('stats.log', 'a')
level = NOTSET
formatter = timermiddleware

; 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

[formatter_timermiddleware]
format = {"time": "%(asctime)s,%(msecs)03d", "level": "%(levelname)-5.5s", "name": "%(name)s", "message": %(message)s}
datefmt = %Y-%m-%d %H:%M:%S
