#
# This file will be read by node-config
# See https://github.com/node-config/node-config/wiki/Environment-Variables#custom-environment-variables
#

webserver:
  hostname: "PEERTUBE_WEBSERVER_HOSTNAME"
  port:
    __name: "PEERTUBE_WEBSERVER_PORT"
    __format: "json"
  https:
    __name: "PEERTUBE_WEBSERVER_HTTPS"
    __format: "json"

federation:
  sign_federated_fetches:
    __name: "PEERTUBE_SIGN_FEDERATED_FETCHES"
    __format: "json"

secrets:
  peertube: "PEERTUBE_SECRET"

trust_proxy:
  __name: "PEERTUBE_TRUST_PROXY"
  __format: "json"

database:
  hostname: "PEERTUBE_DB_HOSTNAME"
  port:
    __name: "PEERTUBE_DB_PORT"
    __format: "json"
  name: "PEERTUBE_DB_NAME"
  suffix: "PEERTUBE_DB_SUFFIX"
  username: "PEERTUBE_DB_USERNAME"
  password: "PEERTUBE_DB_PASSWORD"
  ssl:
    __name: "PEERTUBE_DB_SSL"
    __format: "json"

redis:
  hostname: "PEERTUBE_REDIS_HOSTNAME"
  port:
    __name: "PEERTUBE_REDIS_PORT"
    __format: "json"
  auth: "PEERTUBE_REDIS_AUTH"

smtp:
  hostname: "PEERTUBE_SMTP_HOSTNAME"
  port:
    __name: "PEERTUBE_SMTP_PORT"
    __format: "json"
  username: "PEERTUBE_SMTP_USERNAME"
  password: "PEERTUBE_SMTP_PASSWORD"
  tls:
    __name: "PEERTUBE_SMTP_TLS"
    __format: "json"
  disable_starttls:
    __name: "PEERTUBE_SMTP_DISABLE_STARTTLS"
    __format: "json"
  from_address: "PEERTUBE_SMTP_FROM"

object_storage:
  enabled:
    __name: "PEERTUBE_OBJECT_STORAGE_ENABLED"
    __format: "json"

  endpoint: "PEERTUBE_OBJECT_STORAGE_ENDPOINT"

  region: "PEERTUBE_OBJECT_STORAGE_REGION"

  upload_acl:
    public: "PEERTUBE_OBJECT_STORAGE_UPLOAD_ACL_PUBLIC"
    private: "PEERTUBE_OBJECT_STORAGE_UPLOAD_ACL_PRIVATE"

  proxy:
    proxify_private_files:
      __name: "PEERTUBE_OBJECT_STORAGE_PROXY_PROXIFY_PRIVATE_FILES"
      __format: "json"

  credentials:
    access_key_id: "PEERTUBE_OBJECT_STORAGE_CREDENTIALS_ACCESS_KEY_ID"
    secret_access_key: 'PEERTUBE_OBJECT_STORAGE_CREDENTIALS_SECRET_ACCESS_KEY'

  max_upload_part:
    __name: "PEERTUBE_OBJECT_STORAGE_MAX_UPLOAD_PART"
    __format: "json"

  max_request_attempts:
    __name: "PEERTUBE_OBJECT_STORAGE_MAX_REQUEST_ATTEMPTS"
    __format: "json"

  streaming_playlists:
    bucket_name: "PEERTUBE_OBJECT_STORAGE_STREAMING_PLAYLISTS_BUCKET_NAME"
    prefix: "PEERTUBE_OBJECT_STORAGE_STREAMING_PLAYLISTS_PREFIX"
    base_url: "PEERTUBE_OBJECT_STORAGE_STREAMING_PLAYLISTS_BASE_URL"
    store_live_streams:
      __name: "PEERTUBE_OBJECT_STORAGE_STREAMING_PLAYLISTS_STORE_LIVE_STREAMS"
      __format: "json"

  web_videos:
    bucket_name: "PEERTUBE_OBJECT_STORAGE_WEB_VIDEOS_BUCKET_NAME"
    prefix: "PEERTUBE_OBJECT_STORAGE_WEB_VIDEOS_PREFIX"
    base_url: "PEERTUBE_OBJECT_STORAGE_WEB_VIDEOS_BASE_URL"

  user_exports:
    bucket_name: "PEERTUBE_OBJECT_STORAGE_USER_EXPORTS_BUCKET_NAME"
    prefix: "PEERTUBE_OBJECT_STORAGE_USER_EXPORTS_PREFIX"
    base_url: "PEERTUBE_OBJECT_STORAGE_USER_EXPORTS_BASE_URL"

  original_video_files:
    bucket_name: "PEERTUBE_OBJECT_STORAGE_ORIGINAL_VIDEO_FILES_BUCKET_NAME"
    prefix: "PEERTUBE_OBJECT_STORAGE_ORIGINAL_VIDEO_FILES_PREFIX"
    base_url: "PEERTUBE_OBJECT_STORAGE_ORIGINAL_VIDEO_FILES_BASE_URL"

  captions:
    bucket_name: "PEERTUBE_OBJECT_STORAGE_CAPTIONS_BUCKET_NAME"
    prefix: "PEERTUBE_OBJECT_STORAGE_CAPTIONS_PREFIX"
    base_url: "PEERTUBE_OBJECT_STORAGE_CAPTIONS_BASE_URL"

webadmin:
  configuration:
    edition:
      allowed:
        __name: "PEERTUBE_WEBADMIN_CONFIGURATION_EDITION_ALLOWED"
        __format: "json"

log:
  level: "PEERTUBE_LOG_LEVEL"
  log_ping_requests:
    __name: "PEERTUBE_LOG_PING_REQUESTS"
    __format: "json"

user:
  video_quota:
    __name: "PEERTUBE_USER_VIDEO_QUOTA"
    __format: "json"

admin:
  email: "PEERTUBE_ADMIN_EMAIL"

contact_form:
  enabled:
    __name: "PEERTUBE_CONTACT_FORM_ENABLED"
    __format: "json"

signup:
  enabled:
    __name: "PEERTUBE_SIGNUP_ENABLED"
    __format: "json"
  limit:
    __name: "PEERTUBE_SIGNUP_LIMIT"
    __format: "json"

search:
  remote_uri:
    users:
      __name: "PEERTUBE_SEARCH_REMOTEURI_USERS"
      __format: "json"
    anonymous:
      __name: "PEERTUBE_SEARCH_REMOTEURI_ANONYMOUS"
      __format: "json"

import:
  videos:
    http:
      enabled:
        __name: "PEERTUBE_IMPORT_VIDEOS_HTTP"
        __format: "json"
    torrent:
      enabled:
        __name: "PEERTUBE_IMPORT_VIDEOS_TORRENT"
        __format: "json"

transcoding:
  enabled:
    __name: "PEERTUBE_TRANSCODING_ENABLED"
    __format: "json"
  threads:
    __name: "PEERTUBE_TRANSCODING_THREADS"
    __format: "json"
  resolutions:
    144p:
      __name: "PEERTUBE_TRANSCODING_144P"
      __format: "json"
    240p:
      __name: "PEERTUBE_TRANSCODING_240P"
      __format: "json"
    360p:
      __name: "PEERTUBE_TRANSCODING_360P"
      __format: "json"
    480p:
      __name: "PEERTUBE_TRANSCODING_480P"
      __format: "json"
    720p:
      __name: "PEERTUBE_TRANSCODING_720P"
      __format: "json"
    1080p:
      __name: "PEERTUBE_TRANSCODING_1080P"
      __format: "json"
    1440p:
      __name: "PEERTUBE_TRANSCODING_1440P"
      __format: "json"
    2160p:
      __name: "PEERTUBE_TRANSCODING_2160P"
      __format: "json"
  web_videos:
    enabled:
      __name: "PEERTUBE_TRANSCODING_WEB_VIDEOS_ENABLED"
      __format: "json"
  hls:
    enabled:
      __name: "PEERTUBE_TRANSCODING_HLS_ENABLED"
      __format: "json"

instance:
  name: "PEERTUBE_INSTANCE_NAME"
  description: "PEERTUBE_INSTANCE_DESCRIPTION"
  terms: "PEERTUBE_INSTANCE_TERMS"

live:
  enabled:
    __name: "PEERTUBE_LIVE_ENABLED"
    __format: "json"

  max_duration:
    __name: "PEERTUBE_LIVE_MAX_DURATION"
    __format: "json"

  max_instance_lives:
    __name: "PEERTUBE_LIVE_MAX_INSTANCE_LIVES"
    __format: "json"

  max_user_lives:
    __name: "PEERTUBE_LIVE_MAX_USER_LIVES"
    __format: "json"

  allow_replay:
    __name: "PEERTUBE_LIVE_ALLOW_REPLAY"
    __format: "json"

  latency_setting:
    enabled:
      __name: "PEERTUBE_LIVE_LATENCY_SETTING_ENABLED"
      __format: "json"

  rtmp:
    enabled:
      __name: "PEERTUBE_LIVE_RTMP_ENABLED"
      __format: "json"
    port:
      __name: "PEERTUBE_LIVE_RTMP_PORT"
      __format: "json"
    hostname: "PEERTUBE_LIVE_RTMP_HOSTNAME"
    public_hostname: "PEERTUBE_LIVE_RTMP_PUBLIC_HOSTNAME"
  rtmps:
    enabled:
      __name: "PEERTUBE_LIVE_RTMPS_ENABLED"
      __format: "json"
    port:
      __name: "PEERTUBE_LIVE_RTMPS_PORT"
      __format: "json"
    hostname: "PEERTUBE_LIVE_RTMPS_HOSTNAME"
    public_hostname: "PEERTUBE_LIVE_RTMPS_PUBLIC_HOSTNAME"
    key_file: "PEERTUBE_LIVE_RTMPS_KEY_FILE"
    cert_file: "PEERTUBE_LIVE_RTMPS_CERT_FILE"

  transcoding:
    enabled:
      __name: "PEERTUBE_LIVE_TRANSCODING_ENABLED"
      __format: "json"

    remote_runners:
      enabled:
        __name: "PEERTUBE_LIVE_TRANSCODING_REMOTE_RUNNERS_ENABLED"
        __format: "json"

    threads:
      __name: "PEERTUBE_LIVE_TRANSCODING_THREADS"
      __format: "json"

    profile: "PEERTUBE_LIVE_TRANSCODING_PROFILE"

    resolutions:
      0p:
        __name: "PEERTUBE_LIVE_TRANSCODING_0P"
        __format: "json"
      144p:
        __name: "PEERTUBE_LIVE_TRANSCODING_144P"
        __format: "json"
      240p:
        __name: "PEERTUBE_LIVE_TRANSCODING_240P"
        __format: "json"
      360p:
        __name: "PEERTUBE_LIVE_TRANSCODING_360P"
        __format: "json"
      480p:
        __name: "PEERTUBE_LIVE_TRANSCODING_480P"
        __format: "json"
      720p:
        __name: "PEERTUBE_LIVE_TRANSCODING_720P"
        __format: "json"
      1080p:
        __name: "PEERTUBE_LIVE_TRANSCODING_1080P"
        __format: "json"
      1440p:
        __name: "PEERTUBE_LIVE_TRANSCODING_1440P"
        __format: "json"
      2160p:
        __name: "PEERTUBE_LIVE_TRANSCODING_2160P"
        __format: "json"

    always_transcode_original_resolution:
      __name: "PEERTUBE_LIVE_TRANSCODING_ALWAYS_TRANSCODE_ORIGINAL_RESOLUTION"
      __format: "json"

    fps:
      max:
        __name: "PEERTUBE_LIVE_TRANSCODING_FPS_MAX"
        __format: "json"

