## Pretix core
PRETIX_PRETIX_INSTANCE_NAME="{{ PRIMARY_DOMAIN | upper }} Tickets"
PRETIX_PRETIX_ALLOWED_HOSTS="{{ PRETIX_HOSTNAME }},127.0.0.1,localhost"
PRETIX_PRETIX_URL="{{ PRETIX_URL }}"
PRETIX_PRETIX_AUTH_BACKENDS="pretix.base.auth.NativeAuthBackend{% if PRETIX_OIDC_ENABLED %},pretix_oidc.auth.OIDCAuthBackend{% endif %}"

## Locale
PRETIX_LOCALE_TIMEZONE="{{ HOST_TIMEZONE }}"

## Database
PRETIX_DATABASE_BACKEND="postgresql"
PRETIX_DATABASE_NAME="{{ database_name }}"
PRETIX_DATABASE_USER="{{ database_username }}"
PRETIX_DATABASE_PASSWORD="{{ database_password }}"
PRETIX_DATABASE_HOST="{{ database_host }}"
PRETIX_DATABASE_PORT="{{ database_port }}"
PRETIX_WEB_CONCURRENCY="{{ POSTGRES_ALLOWED_AVG_CONNECTIONS }}"
PRETIX_WORKER_THREADS="{{ (POSTGRES_ALLOWED_AVG_CONNECTIONS | int // 2 ) }}"

{% if PRETIX_REDIS_ENABLED %}
## Redis
PRETIX_REDIS_SESSIONS="true"
PRETIX_REDIS_LOCATION="redis://redis:6379/{{ PRETIX_REDIS_CACHE_DB }}"
CELERY_BROKER_URL="redis://redis:6379/{{ PRETIX_REDIS_BROKER_DB }}"
CELERY_RESULT_BACKEND="redis://redis:6379/{{ PRETIX_REDIS_RESULT_DB }}"
{% endif %}

{% if PRETIX_OIDC_ENABLED %}
## OIDC (plugin)
PRETIX_OIDC_TITLE="{{ PRETIX_OIDC_LABEL | replace('\"','\\\"') }}"
PRETIX_OIDC_ISSUER="{{ PRETIX_OIDC_ISSUER }}"
PRETIX_OIDC_AUTHORIZATION_ENDPOINT="{{ PRETIX_OIDC_AUTH_URL }}"
PRETIX_OIDC_TOKEN_ENDPOINT="{{ PRETIX_OIDC_TOKEN_URL }}"
PRETIX_OIDC_USERINFO_ENDPOINT="{{ PRETIX_OIDC_USERINFO_URL }}"
PRETIX_OIDC_END_SESSION_ENDPOINT="{{ PRETIX_OIDC_LOGOUT_URL }}"
PRETIX_OIDC_JWKS_URI="{{ PRETIX_OIDC_JWKS_URL }}"
PRETIX_OIDC_CLIENT_ID="{{ PRETIX_OIDC_CLIENT_ID }}"
PRETIX_OIDC_CLIENT_SECRET="{{ PRETIX_OIDC_CLIENT_SECRET }}"
PRETIX_OIDC_SCOPES="{{ PRETIX_OIDC_SCOPES }}"
PRETIX_OIDC_UNIQUE_ATTRIBUTE="{{ PRETIX_OIDC_UNIQUE_ATTRIBUTE }}"
{% endif %}
