# Database / Postgres service configuration
POSTGRES_USER={{ database_username }}
POSTGRES_PASSWORD={{ database_password }}
POSTGRES_DB={{ database_name }}
PEERTUBE_DB_USERNAME={{ database_username }}
PEERTUBE_DB_PASSWORD={{ database_password }}
PEERTUBE_DB_SSL=false
PEERTUBE_DB_HOSTNAME={{ database_host }}

# PeerTube server configuration
PEERTUBE_WEBSERVER_HOSTNAME={{ domains | get_domain(application_id) }}
PEERTUBE_TRUST_PROXY=["127.0.0.1", "loopback"]

PEERTUBE_SECRET={{ applications | get_app_conf(application_id, 'credentials.secret', True)}}

# E-mail configuration
PEERTUBE_SMTP_USERNAME={{ users['no-reply'].email }}
PEERTUBE_SMTP_PASSWORD={{ users['no-reply'].mailu_token }}
PEERTUBE_SMTP_HOSTNAME={{ SYSTEM_EMAIL.HOST }}
PEERTUBE_SMTP_PORT={{ SYSTEM_EMAIL.PORT }}
PEERTUBE_SMTP_FROM={{ users['no-reply'].email }}
PEERTUBE_SMTP_TLS={{ SYSTEM_EMAIL.TLS | lower }}
PEERTUBE_SMTP_DISABLE_STARTTLS={{ 'false' if SYSTEM_EMAIL.START_TLS else 'true' }}
PEERTUBE_ADMIN_EMAIL={{ users['no-reply'].email }}