Files
computer-playbook/roles/web-app-pretix/vars/main.yml
Kevin Veen-Birkenbach 9f734dff17 web-app-pretix: fix healthcheck and allowed hosts
- Add Host header to curl healthcheck when container_hostname is defined
- Use PRETIX_PRETIX_ALLOWED_HOSTS to fix Django 400 Bad Request during healthcheck
- Centralize PRETIX_HOSTNAME from container_hostname var
- Add Redis broker/result backend config for Celery

See: https://chatgpt.com/share/68b59c42-c0fc-800f-9bfb-f1137c59b3de
2025-09-01 15:15:04 +02:00

40 lines
2.1 KiB
YAML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# General
application_id: "web-app-pretix"
database_type: "postgres"
container_port: 80
container_hostname: "{{ domains | get_domain(application_id) }}"
# Pretix
## URLs
PRETIX_URL: "{{ domains | get_url(application_id, WEB_PROTOCOL) }}"
PRETIX_HOSTNAME: "{{ container_hostname }}"
## OIDC (mirrors GitLabs pattern)
PRETIX_OIDC_ENABLED: "{{ applications | get_app_conf(application_id, 'features.oidc') }}"
PRETIX_OIDC_LABEL: "{{ OIDC.BUTTON_TEXT }}"
PRETIX_OIDC_CLIENT_ID: "{{ OIDC.CLIENT.ID }}"
PRETIX_OIDC_CLIENT_SECRET: "{{ OIDC.CLIENT.SECRET }}"
PRETIX_OIDC_ISSUER: "{{ OIDC.CLIENT.ISSUER_URL }}"
PRETIX_OIDC_AUTH_URL: "{{ OIDC.CLIENT.AUTHORIZE_URL }}"
PRETIX_OIDC_TOKEN_URL: "{{ OIDC.CLIENT.TOKEN_URL }}"
PRETIX_OIDC_USERINFO_URL: "{{ OIDC.CLIENT.USER_INFO_URL }}"
PRETIX_OIDC_LOGOUT_URL: "{{ OIDC.CLIENT.LOGOUT_URL }}"
PRETIX_OIDC_JWKS_URL: "{{ OIDC.CLIENT.CERTS }}"
PRETIX_OIDC_SCOPES: "openid,email,profile"
# Use Keycloak username claim by default (plugin default is 'sub')
PRETIX_OIDC_UNIQUE_ATTRIBUTE: "{{ OIDC.ATTRIBUTES.USERNAME }}"
## Redis
PRETIX_REDIS_ENABLED: "{{ applications | get_app_conf(application_id, 'docker.services.redis.enabled') }}"
PRETIX_REDIS_CACHE_DB: 1
PRETIX_REDIS_BROKER_DB: 0
PRETIX_REDIS_RESULT_DB: 2
## Docker
PRETIX_IMAGE_CUSTOM: "pretix_custom"
PRETIX_IMAGE: "{{ applications | get_app_conf(application_id, 'docker.services.pretix.image') }}"
PRETIX_VERSION: "{{ applications | get_app_conf(application_id, 'docker.services.pretix.version') }}"
PRETIX_CONTAINER: "{{ applications | get_app_conf(application_id, 'docker.services.pretix.name') }}"
PRETIX_DATA_VOLUME: "{{ applications | get_app_conf(application_id, 'docker.volumes.data') }}"
PRETIX_OIDC_PLUGIN_VERSION: "{{ applications | get_app_conf(application_id, 'plugins.oidc.version') }}"