From ee87d7ee6b7353b6fc9a724efe315ed68b662d81 Mon Sep 17 00:00:00 2001 From: Stefan Bethke Date: Sat, 14 Nov 2026 09:00:34 +0100 Subject: [PATCH] Add Pretix with own list of plugins We want to be able to use plugins in our Pretix, so build a custom image with them. Initially only the pretix-passbook plugin is active. --- .forgejo/workflows/build_pretix.yml | 44 +++++++++++++++++++++++++++++ README.md | 1 + pretix/Containerfile | 12 ++++++++ pretix/requirements.txt | 3 ++ 4 files changed, 60 insertions(+) create mode 100644 .forgejo/workflows/build_pretix.yml create mode 100644 pretix/Containerfile create mode 100644 pretix/requirements.txt diff --git a/.forgejo/workflows/build_pretix.yml b/.forgejo/workflows/build_pretix.yml new file mode 100644 index 0000000..cf170dd --- /dev/null +++ b/.forgejo/workflows/build_pretix.yml @@ -0,0 +1,44 @@ +name: Build Pretix + +on: + workflow_dispatch: {} + push: + paths: + - '.forgejo/workflows/build_pretix.yml' + - 'pretix/**' + schedule: + - cron: "@daily" + +jobs: + build-container: + name: Build Pretix Image + runs-on: docker + container: + image: ghcr.io/osscontainertools/kaniko:alpine + strategy: + matrix: + pretix-version: + # renovate: datasource=docker depName=docker.io/pretix/standalone + - 2026.8 + steps: + - name: Install required system packages + run: apk add --no-cache nodejs + + - name: Checkout Source Code + uses: actions/checkout@v7 + + - name: Build Container + env: + KANIKO_NO_PUSH: ${{ forgejo.ref_name != 'main' }} + KANIKO_GIT_HAMBURG_CCC_DE_USER: forgejo-actions + KANIKO_GIT_HAMBURG_CCC_DE_PASSWORD: ${{ secrets.PACKAGES_TOKEN }} + run: /kaniko/executor + --dockerfile="${{forgejo.workspace }}/pretix/Containerfile" + --context="dir://${{ forgejo.workspace }}/pretix" + --build-arg=TAG=${{ matrix.pretix-version }} + --destination=git.hamburg.ccc.de/ccchh/oci-images/pretix:${{ matrix.pretix-version }} + --no-push-cache + --credential-helpers=env + --annotation=org.opencontainers.image.ref.name=pretix + --annotation=org.opencontainers.image.url=${{ forgejo.server_url }}/${{ forgejo.repository }} + --annotation=org.opencontainers.image.source=${{ forgejo.server_url }}/${{ forgejo.repository }} diff --git a/README.md b/README.md index 557f82b..36a5a2c 100644 --- a/README.md +++ b/README.md @@ -12,6 +12,7 @@ Tools in use: - `git.hamburg.ccc.de/CCCHH/oci-images/keycloak` - `git.hamburg.ccc.de/CCCHH/oci-images/nextcloud` +- `git.hamburg.ccc.de/CCCHH/oci-images/pretix` - `git.hamburg.ccc.de/CCCHH/oci-images/penpot/frontend` - `git.hamburg.ccc.de/CCCHH/oci-images/penpot/backend` - `git.hamburg.ccc.de/CCCHH/oci-images/penpot/exporter` diff --git a/pretix/Containerfile b/pretix/Containerfile new file mode 100644 index 0000000..87f9220 --- /dev/null +++ b/pretix/Containerfile @@ -0,0 +1,12 @@ +ARG TAG=latest + +FROM docker.io/pretix/standalone:${TAG} + +USER root +COPY requirements.txt /tmp/plugin-requirements.txt +RUN pip3 install --no-cache-dir -r /tmp/plugin-requirements.txt \ + && rm /tmp/plugin-requirements.txt + +USER pretixuser +# Compile static files and translations, including those of the plugins. +RUN cd /pretix/src && make production diff --git a/pretix/requirements.txt b/pretix/requirements.txt new file mode 100644 index 0000000..3a4519f --- /dev/null +++ b/pretix/requirements.txt @@ -0,0 +1,3 @@ +# Pretix plugins to install into the image. +# Pin versions so Renovate can propose updates. +pretix-passbook==1.14.1