# Open Library Docker (dev) configuration

connection_type: hybrid

site: openlibrary.org

from_address: "Open Library <noreply@archive.org>"
report_spam_address: "Open Library <info@archive.org>"

support_case_notification_address: "Open Library <info@archive.org>"
support_case_control_address: "support@archive.org"

smtp_server: localhost

dummy_sendmail: True
debug: True

coverstore_url: http://covers:7075
# URL to use inside HTML files; must be publicly accessible from
# a client's browser
coverstore_public_url: http://localhost:7075

state_dir: var/run

# enable http compression
use_gzip: True

admin_password: admin123
errorlog: /var/log/openlibrary/ol-errors
login_cookie_name: session

infobase_server: infobase:7000

# contents of this file are assigned to config["infobase"]
# Path can be relative to this file
infobase_config_file: infobase.yml
coverstore_config_file: coverstore.yml

loanstatus_url: http://web:8080/
ia_access_secret: foobar

memcache_servers:
    - memcached:11211

plugin_modules:
    - openlibrary
    - infogami.plugins.links
    - infogami.plugins.api

plugin_worksearch:
    solr_next: true
    solr_base_url: http://solr:8983/solr/openlibrary
    spellcheck_count: 3

http_request_timeout: 10

features:
    cache_most_recent: enabled
    debug: enabled
    dev: enabled
    history_v2: admin
    inlibrary: enabled
    lending_v2: enabled
    lists: enabled
    merge-authors:
        filter: usergroup
        usergroup: /usergroup/librarians
    merge-editions: admin
    publishers: enabled
    recentchanges_v2: enabled
    stats: enabled
    stats-header: enabled
    superfast: enabled
    support: admin
    undo: enabled
    upstream: enabled

upstream_to_www_migration: true
default_template_root: /upstream
css_root: /upstream/css
js_root: /upstream/js
logging_config_file: conf/logging.ini
email_config_file: conf/email.ini

lists:
    seeds_db: http://localhost:5984/seeds
    editions_db: http://localhost:5984/editions
    works_db: http://localhost:5984/works
    editions_view: http://localhost:5984/editions/_fti/_design/seeds/by_seed

admin:
    nagios_url: http://monitor.us.archive.org/cgi-bin/nagios3/status.cgi?hostgroup=24.openlibrary&style=detail
    statsd_server: localhost:9090
    admin_db: http://localhost:5984/admin

stats: # This section is used to state what stats need to be gathered.
    pageload.all:
      filter: all
      time: total

    pageload.books:
      filter: url
      pattern: /books/OL\d+M
      time: total

    pageload.works:
      filter: url
      pattern: /works/OL\d+M
      time: total

    pageload.authors:
      filter: url
      pattern: /authors/OL\d+M
      time: total

    pageload.author:
      filter: url
      pattern: /authors/OL\d+M
      time: total

    pageload.home:
      filter: url
      pattern: ^/$
      time: total

    pageload.recentchanges:
      filter: url
      pattern: /recentchanges
      time: total

    pageload.lists:
      filter: url
      pattern: /lists
      time: total

    ol.pageload.readapi:
      filter: url
      pattern: /api/volumes/.*
      time: total

# prefixes ignored for /books/ia:xxx URLs and solr_updater.py
ia_ignore_prefixes:
    - "jstor-"
    - "imslp-"
    - "nasa_techdoc_"
    - "gov.uscourts."

plugin_recaptcha:
    public_key: ''
    private_key: ''

plugin_invisible_recaptcha:
    public_key: ''
    private_key: ''

plugin_inside:
    search_endpoint: https://be-api.us.archive.org/fts/v1/search

affiliate_ids:
    # Amazon is a book source, not just an affiliate, so we make its affiliate
    # tag generally available
    amazon: internetarchi-20

ia_ol_xauth_s3:
    s3_key: XXX
    s3_secret: XXX

ia_loan_api_url: http://web:8080/internal/fake/loans
ia_xauth_api_url: http://web:8080/internal/fake/xauth

internal_tests_api_key: 8oPd1tx747YH374ohs48ZO5s2Nt1r9yD
ia_availability_api_v2_url: https://archive.org/services/availability/
ia_base_url: https://archive.org

sentry:
    enabled: false
    # Dummy endpoint; where sentry logs are sent to
    dsn: 'https://examplePublicKey@o0.ingest.sentry.io/0'
    traces_sample_rate: 1.0
    environment: 'local'

sentry_cron_jobs:
    enabled: false
    # Dummy endpoint; where sentry logs are sent to
    dsn: 'https://examplePublicKey@o0.ingest.sentry.io/0'
    environment: 'local'

# Observations cache settings:
observation_cache_duration: 86400
