---
name: file_server

templates:
  file_server.json.erb: config/file_server.json
  bpm.yml.erb: config/bpm.yml
  file_server_ctl.erb: bin/file_server_ctl
  file_server_as_vcap.erb: bin/file_server_as_vcap
  pre-start.erb: bin/pre-start
  loggregator_ca.crt.erb: config/certs/loggregator/ca.crt
  loggregator_client.crt.erb: config/certs/loggregator/client.crt
  loggregator_client.key.erb: config/certs/loggregator/client.key

packages:
  - pid_utils
  - file_server
  - buildpack_app_lifecycle
  - docker_app_lifecycle
  - windows_app_lifecycle

properties:
  bpm.enabled:
    description: "Experimental: use the BOSH Process Manager to manage the file-server process."
    default: false
  diego.file_server.listen_addr:
    description: "Address of interface on which to serve files"
    default: "0.0.0.0:8080"
  diego.file_server.static_directory:
    default: "/var/vcap/jobs/file_server/packages/"
    description: "Fully-qualified path to the doc root for the file server's static files"
  diego.file_server.debug_addr:
    description: "address at which to serve debug info"
    default: "127.0.0.1:17005"
  diego.file_server.log_level:
    description: "Log level"
    default: "info"
  diego.file_server.dropsonde_port:
    description: "local metron agent's port. Deprecated, will be removed when loggregator API v1 support is removed."
    default: 3457

  enable_consul_service_registration:
    description: "Enable the file-server to register itself as a service with Consul, for client discovery via Consul DNS. Do not disable without arranging alternate service discovery."
    default: true

  loggregator.use_v2_api:
    description: "Whether component should use the v2 loggregator API when sending data to the metron agent instead of the 'legacy' v1 API."
    default: false
  loggregator.v2_api_port:
    description: "Port which the component should use to communicate to the metron agent's v2 API (host is assumed to be `localhost`)."
    default: 3458
  loggregator.ca_cert:
    description: "CA certificate to use to verify the metron agent serving the v2 API."
  loggregator.cert:
    description: "Client certificate for the SSH-proxy to use when communicating to the metron agent."
  loggregator.key:
    description: "Private key for the SSH-proxy metron client certificate."
