#
# This file contains the default configuration of the Open Build Service API.
#

default: &default
  #read_only_hosts: [ "build.opensuse.org", "software.opensuse.org" ]

  # Make use of mod_xforward module in apache
  #use_xforward: true

  # Make use of X-Accel-Redirect for Nginx.
  # http://kovyrin.net/2010/07/24/nginx-fu-x-accel-redirect-remote
  #use_nginx_redirect: /internal_redirect

  # Set to true to verify XML reponses comply to the schema
  response_schema_validation: false

  # backend source server
  source_host: localhost
  # NOTE: the source_port setting is ignored and hardcoded for "test" and "development" env
  source_port: 5352
  #source_protocol: https
  #source_protocol_ssl_verification: false

  # api access to this instance
  frontend_host: localhost
  frontend_port: 443
  frontend_protocol: https

  ### Public Access Configuration
  # Configure if this OBS is allowing people to browse it's content anonymously or not.
  # Disabling this also disables the interconnect feature.
  # Boolean: true or false
  # Default: true
  #
  # allow_anonymous: false

  ### Proxy Auth Configuration
  # Configure if this OBS is behind an Identity And Access Proxy (IAP). A
  # reverse proxy in front of this OBS that authenticates the user making the
  # request using an Identity Provider (IDP) and modifies the request headers
  # to include information about the authenticated user.
  #
  # Request Headers used by OBS:
  # - HTTP_X_USERNAME -> User.login
  # - HTTP_X_EMAIL -> User.email
  # - HTTP_X_FIRSTNAME + HTTP_X_LASTNAME -> User.realname
  #
  # The mode. Can be:
  # - :off to disable it
  # - :on to enable generic mode
  # - :mellon to enable apache mod_auth_mellon (SAML) mode
  # - :ichain to enable legacy ichain mode
  proxy_auth_mode: :off
  #
  # The URL we send people to log in.
  # *This setting is required for proxy auth to work.
  # proxy_auth_login_page: https://my-idp.example.com/login
  #
  # The URL we send people to log out.
  # *This setting is required for proxy auth to work.
  # proxy_auth_logout_page: https://my-idp.example.com/logout
  #
  # The URL we send people to sign up.
  # This setting is optional, if not set sign up is disabled.
  # proxy_auth_register_page: https://my-idp.example.com/signup
  #
  # The URL we send people to view their account.
  # This setting is optional, if not set account links are not shown.
  # proxy_auth_account_page: https://my-idp.example.com/myaccount

  #schema_location

  #version

  # if set to false, the API will only fake writes to backend (useful in testing)
  # global_write_through: true

  # see http://colszowka.heroku.com/2011/02/22/setting-up-your-custom-hoptoad-notifier-endpoint-for-free-using-errbit-on-heroku
  #errbit_api_key: api_key_of_your_app
  #errbit_project_id:
  #errbit_host: installation.of.errbit.com

  # Data to locate the database backup
  # Will be used in the script/import_database.rb script
  backup_server: foo.bar
  backup_user: tux
  backup_location: /home/tux
  backup_filename: obs_production.sql.xz
  backup_port: 22

  # Rabbitmq based message bus
  #
  # Prefix of the message bus rooting key
  # amqp_namespace: 'opensuse.obs'
  #
  # Connection options -> http://rubybunny.info/articles/connecting.html
  # amqp_options:
  #   host: rabbit.example.com
  #   port: 5672
  #   user: guest
  #   pass: guest
  #   vhost: vhost
  #   recovery_attempts: 75
  #
  # Exchange options -> http://rubybunny.info/articles/exchanges.html
  # amqp_exchange_name: pubsub
  # amqp_exchange_options:
  #  type: :topic
  #  auto_delete: false
  #  arguments:
  #    persistent: true
  #    passive: true

  # For sending application performance metrics to a influx time series database
  # influxdb_database: rails
  # influxdb_username: rails
  # influxdb_password: 123456
  # influxdb_hosts:
  #  - domain.tld
  # influxdb_port: 8086
  # influxdb_ssl: true
  # influxdb_retry: 10
  # influxdb_time_precision: ms

  # Disable the contribution graph on the user home page
  # contribution_graph: :off

  # Display sponsors above the footer on every page
  # sponsors:
  # - name: Sponsor ABC
  #   description: We are the best at ABC
  #   icon: sponsor_abc
  #   url: https://www.example.com

  # Lifetime for repositories published after accepting maintenance release requests.
  # Default: 2 days (172800 seconds).
  # maintenance_release_repositories_lifetime: 172800

  # Lifetime for notifications.
  # Default: 365 days (1 year).
  notifications_lifetime: 365

  # Prevent adding the user as a maintainer, in project creation, in this API endpoint:
  # PUT /source/:project/_meta
  # Former and default value is `false`: the user is added as a maintainer.
  prevent_adding_maintainer_in_project_creation_with_api: false

  # Limit results returned by this API endpoint:
  # GET /search/...
  # Return a 403 error if both:
  # - number of matched results surpass the limit
  # - the endpoint doesn't end in .../id
  # limit_for_search_results: 10000

production:
  <<: *default

test:
  <<: *default
  source_host: backend
  memcached_host: cache

development:
  <<: *default
  source_host: backend
  memcached_host: cache
