mirror of
https://github.com/kevinveenbirkenbach/computer-playbook.git
synced 2025-08-30 23:38:13 +02:00
web-app-pretix: fully implemented role
Summary: - Replace draft with complete README (features, resources, credits). - Remove obsolete Todo.md. - Switch to custom image tag (PRETIX_IMAGE_CUSTOM) and install 'pretix-oidc' in Dockerfile. - Drop unused 'config' volume; keep persistent 'data' only. - Rename docker-compose service from 'application' to 'pretix' and use container_port. - Use standard depends_on include for DB/Redis (dmbs_excl). - Align vars to docker.services.pretix.* (image/version/name); add PRETIX_IMAGE_CUSTOM. Breaking: - Service key changed to 'pretix' under docker.services. - 'config' volume removed from compose. Status: - Pretix role is now fully implemented and production-ready. Reference: - Conversation: https://chatgpt.com/share/68b1cb34-b7dc-800f-8b39-c183124972f2
This commit is contained in:
@@ -1,2 +1,33 @@
|
||||
# Pretix (Draft)
|
||||
See https://github.com/pretix/pretix
|
||||
# Pretix
|
||||
|
||||
## Description
|
||||
|
||||
Simplify event management with **Pretix**, an open-source ticketing system for conferences, workshops, and cultural events. Pretix empowers organizers with flexible ticket sales, attendee management, and secure payment integrations, all under your control.
|
||||
|
||||
## Overview
|
||||
|
||||
This role deploys Pretix using Docker, automating the installation, configuration, and management of your Pretix server. It integrates with an external PostgreSQL database, Redis for caching and sessions, and an Nginx reverse proxy. The role supports advanced features such as global CSS injection, Matomo analytics, OIDC authentication, and centralized logout, making it a powerful and customizable solution within the Infinito.Nexus ecosystem.
|
||||
|
||||
## Features
|
||||
|
||||
- **Pretix Installation:** Deploys Pretix in a dedicated Docker container.
|
||||
- **External PostgreSQL Database:** Configures Pretix to use a centralized PostgreSQL service.
|
||||
- **Redis Integration:** Adds Redis support for caching and session handling.
|
||||
- **Nginx Reverse Proxy Integration:** Provides secure access and HTTPS termination.
|
||||
- **OIDC Authentication:** Seamless integration with identity providers such as Keycloak.
|
||||
- **Centralized Logout:** Unified logout across applications in the ecosystem.
|
||||
- **Matomo Analytics & Global CSS:** Built-in support for analytics and unified styling.
|
||||
|
||||
## Further Resources
|
||||
|
||||
- [Pretix Official Website](https://pretix.eu/)
|
||||
- [Pretix Documentation](https://docs.pretix.eu/en/latest/)
|
||||
- [Pretix GitHub Repository](https://github.com/pretix/pretix)
|
||||
|
||||
## Credits
|
||||
|
||||
Developed and maintained by **Kevin Veen-Birkenbach**.
|
||||
Learn more at [veen.world](https://www.veen.world).
|
||||
|
||||
Part of the [Infinito.Nexus Project](https://s.infinito.nexus/code)
|
||||
Licensed under [Infinito.Nexus NonCommercial License](https://s.infinito.nexus/license).
|
||||
|
@@ -1,2 +0,0 @@
|
||||
# Todo
|
||||
- This role needs to be fully implemented
|
@@ -2,16 +2,15 @@ credentials: {}
|
||||
docker:
|
||||
services:
|
||||
redis:
|
||||
enabled: true
|
||||
enabled: true
|
||||
database:
|
||||
enabled: true
|
||||
application:
|
||||
image: pretix/standalone
|
||||
version: stable
|
||||
name: pretix
|
||||
enabled: true
|
||||
pretix:
|
||||
image: pretix/standalone
|
||||
version: stable
|
||||
name: pretix
|
||||
volumes:
|
||||
data: "pretix_data"
|
||||
config: "pretix_config"
|
||||
data: "pretix_data"
|
||||
features:
|
||||
matomo: true
|
||||
css: true
|
||||
|
@@ -1,4 +1,3 @@
|
||||
ARG PRETIX_BASE_IMAGE={{ PRETIX_IMAGE }}:{{ PRETIX_VERSION }}
|
||||
FROM ${PRETIX_BASE_IMAGE}
|
||||
FROM {{ PRETIX_IMAGE }}:{{ PRETIX_VERSION }}
|
||||
# Install OIDC auth plugin for Pretix
|
||||
RUN python -m pip install --no-cache-dir "pretix-oidc=={{ PRETIX_OIDC_PLUGIN_VERSION }}"
|
||||
|
@@ -1,31 +1,22 @@
|
||||
services:
|
||||
{% include 'roles/docker-compose/templates/base.yml.j2' %}
|
||||
|
||||
application:
|
||||
build:
|
||||
context: .
|
||||
dockerfile: Dockerfile
|
||||
args:
|
||||
PRETIX_BASE_IMAGE: "{{ PRETIX_IMAGE }}:{{ PRETIX_VERSION }}"
|
||||
image: "{{ PRETIX_IMAGE }}:{{ PRETIX_VERSION }}-oidc"
|
||||
image: "{{ PRETIX_IMAGE_CUSTOM }}"
|
||||
container_name: "{{ PRETIX_CONTAINER }}"
|
||||
hostname: '{{ PRETIX_HOSTNAME}}'
|
||||
command: ["all"]
|
||||
ports:
|
||||
- "127.0.0.1:{{ ports.localhost.http[application_id] }}:80"
|
||||
- "127.0.0.1:{{ ports.localhost.http[application_id] }}:{{ container_port }}"
|
||||
volumes:
|
||||
- 'data:/data'
|
||||
- 'config:/etc/pretix'
|
||||
{% include 'roles/docker-container/templates/healthcheck/curl.yml.j2' %}
|
||||
{% include 'roles/docker-container/templates/base.yml.j2' %}
|
||||
depends_on:
|
||||
- database
|
||||
- redis
|
||||
{% include 'roles/docker-container/templates/depends_on/dmbs_excl.yml.j2' %}
|
||||
{% include 'roles/docker-container/templates/networks.yml.j2' %}
|
||||
|
||||
{% include 'roles/docker-compose/templates/volumes.yml.j2' %}
|
||||
config:
|
||||
name: {{ PRETIX_CONF_VOLUME }}
|
||||
data:
|
||||
name: {{ PRETIX_DATA_VOLUME }}
|
||||
|
||||
|
@@ -1,3 +1,4 @@
|
||||
# General
|
||||
application_id: "web-app-pretix"
|
||||
database_type: "postgres"
|
||||
container_port: 80
|
||||
@@ -22,9 +23,9 @@ PRETIX_OIDC_SCOPES: "openid,email,profile"
|
||||
PRETIX_OIDC_UNIQUE_ATTRIBUTE: "{{ OIDC.ATTRIBUTES.USERNAME }}"
|
||||
|
||||
# Docker
|
||||
PRETIX_VERSION: "{{ applications | get_app_conf(application_id, 'docker.services.application.version') }}"
|
||||
PRETIX_IMAGE: "{{ applications | get_app_conf(application_id, 'docker.services.application.image') }}"
|
||||
PRETIX_CONTAINER: "{{ applications | get_app_conf(application_id, 'docker.services.application.name') }}"
|
||||
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_CONF_VOLUME: "{{ applications | get_app_conf(application_id, 'docker.volumes.config') }}"
|
||||
PRETIX_OIDC_PLUGIN_VERSION: "{{ applications | get_app_conf(application_id, 'plugins.oidc.version') }}"
|
||||
|
Reference in New Issue
Block a user