initial configuration

This commit is contained in:
kleines Filmröllchen 2026-02-15 21:15:19 +01:00
commit 54c60fc9b7
Signed by: filmroellchen
SSH key fingerprint: SHA256:UMhcHaeI+VGsiUL2Drpw3aj1iRiQUlx8nxZqUPvoaVw
4 changed files with 94 additions and 0 deletions

4
.gitignore vendored Normal file
View file

@ -0,0 +1,4 @@
.env*
memcached
valkey

34
docker-compose.yml Normal file
View file

@ -0,0 +1,34 @@
services:
pretix:
image: harbor.aalen.space/sfz.aalen/infra/images/pretix-ctbk:1743074527
depends_on: [memcached, valkey]
restart: always
ports:
- 127.0.0.1:1337:80
volumes:
- ./pretix.cfg:/etc/pretix/pretix.cfg
- /var/run/postgresql:/var/run/postgresql
- ./valkey:/run/valkey
- ./memcached:/run/memcached
- /var/lib/pretix:/data
environment:
- TZ=Europe/Berlin
env_file: ".env-pretix"
memcached:
image: docker.io/memcached:alpine
restart: always
command:
- --conn-limit=1024
- --memory-limit=64
- --threads=4
- -s /run/memcached/memcached.sock
volumes:
- ./memcached:/run/memcached
valkey:
image: ghcr.io/valkey-io/valkey:alpine
restart: always
command:
- /etc/valkey.conf
volumes:
- ./valkey.conf:/etc/valkey.conf
- ./valkey:/run/valkey

36
pretix.cfg Normal file
View file

@ -0,0 +1,36 @@
[pretix]
instance_name=tickets.ctbk.de
url=https://tickets.ctbk.de
currency=EUR
datadir=/data
plugins_default=pretix.plugins.sendmail,pretix.plugins.statistics
cookie_domain=.tickets.ctbk.de
registration=Off
[locale]
default=en
timezone=UTC
[database]
backend=postgresql
host = /run/postgresql
name = pretix
user = pretix
[urls]
media=/media/
static=/static/
[mail]
from=events@chaostreff-backnang.de
host=mxe89f.netcup.net
port=465
user=events@chaostreff-backnang.de
tls=off
ssl=on
[django]
debug=off
[memcache]
location = unix:///run/memcached/memcached.sock
[redis]
location=unix:///run/valkey/valkey.sock?db=0
sessions=false
[celery]
backend=redis+socket:///run/valkey/valkey.sock?db=1
broker=redis+socket:///run/valkey/valkey.sock?db=2

20
valkey.conf Normal file
View file

@ -0,0 +1,20 @@
bind -127.0.0.1 -::1
protected-mode yes
# Accept connections on the specified port, default is 6379 (IANA #815344).
# If port 0 is specified the server will not listen on a TCP socket.
port 0
unixsocket /run/valkey/valkey.sock
# unixsocketgroup root
unixsocketperm 777
# Close the connection after a client is idle for N seconds (0 to disable)
timeout 0
# Set the number of databases. The default database is DB 0, you can select
# a different one on a per-connection basis using SELECT <dbid> where
# dbid is a number between 0 and 'databases'-1
# Note: This setting is ignored in cluster mode. Use `cluster-databases` instead.
databases 3