# Values formatted like "_env:ENV_VAR_NAME:default_value" can be overridden by the specified environment variable.
# See https://github.com/yesodweb/yesod/wiki/Configuration#overriding-configuration-values-with-environment-variables
# NB: If you need a numeric value (e.g. 123) to parse as a String, wrap it in single quotes (e.g. "_env:PGPASS:'123'")
# See https://github.com/yesodweb/yesod/wiki/Configuration#parsing-numeric-values-as-strings

static-dir:     "_env:STATIC_DIR:static"
host:           "_env:HOST:*4" # any IPv4 host
port:           "_env:PORT:3000"
ip-from-header: "_env:IP_FROM_HEADER:false"
approot:        "_env:APPROOT:http://localhost:3000"
mail-from:
  name:         "_env:MAILFROM_NAME:Uni2work"
  email:        "_env:MAILFROM_EMAIL:uniworx@localhost"
mail-object-domain: "_env:MAILOBJECT_DOMAIN:localhost"
mail-verp:
  separator:    "+"
  at-replacement: "="
mail-support:
  name:         "_env:MAILSUPPORT_NAME:"
  email:        "_env:MAILSUPPORT:uni2work@ifi.lmu.de"

job-workers:        "_env:JOB_WORKERS:10"
job-flush-interval: "_env:JOB_FLUSH:30"
job-cron-interval:  "_env:CRON_INTERVAL:60"
job-stale-threshold: 300
notification-rate-limit: 3600
notification-collate-delay: 300
notification-expiration: 259201
session-timeout: 7200
jwt-expiration: 604800
maximum-content-length: 52428800

log-settings:
  detailed:      "_env:DETAILED_LOGGING:false"
  all:           "_env:LOG_ALL:false"
  minimum-level: "_env:LOGLEVEL:warn"
  destination:   "_env:LOGDEST:stderr"

# Debugging
auth-dummy-login:  "_env:DUMMY_LOGIN:false"
allow-deprecated:  "_env:ALLOW_DEPRECATED:false"

auth-pw-hash:
  algorithm: "pbkdf2"
  strength: 14

# Optional values with the following production defaults.
# In development, they default to the opposite.
# reload-templates: false
# mutable-static: false
# skip-combining: false
# encrypt-errors: true

database:
  user:     "_env:PGUSER:uniworx"
  password: "_env:PGPASS:uniworx"
  host:     "_env:PGHOST:127.0.0.1"
  port:     "_env:PGPORT:5432"
  # See config/test-settings.yml for an override during tests
  database: "_env:PGDATABASE:uniworx"
  poolsize: "_env:PGPOOLSIZE:10"

ldap:
  host:    "_env:LDAPHOST:"
  tls:     "_env:LDAPTLS:"
  port:    "_env:LDAPPORT:389"
  user:    "_env:LDAPUSER:"
  pass:    "_env:LDAPPASS:"
  baseDN:  "_env:LDAPBASE:"
  scope:   "_env:LDAPSCOPE:WholeSubtree"
  timeout: "_env:LDAPTIMEOUT:5"
  search-timeout: "_env:LDAPSEARCHTIME:5"
  pool:
    stripes: "_env:LDAPSTRIPES:1"
    timeout: "_env:LDAPTIMEOUT:20"
    limit:   "_env:LDAPLIMIT:10"

smtp:
  host:    "_env:SMTPHOST:"
  port:    "_env:SMTPPORT:25"
  ssl:     "_env:SMTPSSL:starttls"
  auth:
    type:  "login"
    user:  "_env:SMTPUSER:"
    pass:  "_env:SMTPPASS:"
  pool:
    stripes: "_env:SMTPSTRIPES:1"
    timeout: "_env:SMTPTIMEOUT:20"
    limit:   "_env:SMTPLIMIT:10"

widget-memcached:
  host:       "_env:MEMCACHEDHOST:"
  port:       "_env:MEMCACHEDPORT:11211"
  auth:       []
  limit:      "_env:MEMCACHEDLIMIT:10"
  timeout:    "_env:MEMCACHEDTIMEOUT:20"
  base-url:   "_env:MEMCACHEDROOT:"
  expiration: "_env:MEMCACHEDEXPIRATION:3600"

user-defaults:
  max-favourites:   12
  theme:            Default
  date-time-format: "%a %d %b %Y %R"
  date-format:      "%d.%m.%Y"
  time-format:      "%R"
  download-files:   false

instance-id: "_env:INSTANCE_ID:instance"
