Files
computer-playbook/roles/web-app-pretix/templates/env.j2
Kevin Veen-Birkenbach 092869b29a pretix: enable OIDC support
- add pretix-oidc plugin installation (Dockerfile, version 2.3.1 default)
- configure OIDC env vars (issuer, endpoints, client ID/secret, scopes, unique attribute)
- enable redis + database, add config/data volumes
- switch canonical domain to ticket.<PRIMARY_DOMAIN> with pretix.<PRIMARY_DOMAIN> alias
- mirror GitLab-style OIDC var structure for consistency

Implements pretix authentication via Keycloak/SSO.
See: https://chatgpt.com/share/68b19721-341c-800f-b372-527164474018
2025-08-29 14:04:03 +02:00

35 lines
1.3 KiB
Django/Jinja

## Pretix core
PRETIX_PRETIX_INSTANCE_NAME="{{ PRIMARY_DOMAIN | upper }} Tickets"
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 }}"
## Redis
PRETIX_REDIS_LOCATION="redis://redis:6379/1"
PRETIX_REDIS_SESSIONS="true"
## OIDC (plugin)
{% if PRETIX_OIDC_ENABLED %}
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 %}