Files
pretix/compose.yml
carla 1c47909a6f
continuous-integration/drone/push Build is failing
continuous-integration/drone/tag Build is passing
chore: publish 2.7.0+2026.5.1 release
2026-06-29 09:10:27 +02:00

138 lines
3.4 KiB
YAML

---
version: "3.8"
services:
app:
image: "pretix/standalone:2026.5.1"
networks:
- proxy
- internal
volumes:
- app:/data
configs:
- source: pretix_config
target: /etc/pretix/pretix.cfg
secrets:
- db_password
- smtp_password
- django_secret_key
- admin_pass
deploy:
restart_policy:
condition: any
labels:
- "traefik.enable=true"
- "traefik.http.services.${STACK_NAME}.loadbalancer.server.port=80"
- "traefik.http.routers.${STACK_NAME}.rule=Host(`${DOMAIN}`${EXTRA_DOMAINS})"
- "traefik.http.routers.${STACK_NAME}.entrypoints=web-secure"
- "traefik.http.routers.${STACK_NAME}.tls.certresolver=${LETS_ENCRYPT_ENV}"
- "coop-cloud.${STACK_NAME}.version=2.7.0+2026.5.1"
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost/healthcheck"]
interval: 30s
timeout: 10s
retries: 30
start_period: 5m
db:
image: postgres:16
volumes:
- "postgres:/var/lib/postgresql/data"
networks:
- internal
environment:
POSTGRES_USER: pretix
POSTGRES_PASSWORD_FILE: /run/secrets/db_password
POSTGRES_DB: pretix
secrets:
- db_password
configs:
- source: pg_backup
target: /pg_backup.sh
mode: 0555
- source: db_entrypoint
target: /docker-entrypoint.sh
mode: 0555
entrypoint: /docker-entrypoint.sh
healthcheck:
test:
[
"CMD-SHELL",
"[ -f $${HEALTHCHECK_MARKER} ] || pg_isready -d $${POSTGRES_DB} -U $${POSTGRES_USER}",
]
interval: 30s
timeout: 5s
retries: 20
start_period: 1m
deploy:
labels:
backupbot.backup: "${ENABLE_BACKUPS:-true}"
backupbot.backup.pre-hook: "/pg_backup.sh backup"
backupbot.backup.volumes.postgres.path: "backup.sql"
backupbot.restore.post-hook: "/pg_backup.sh restore"
redis:
image: redis:8.8.0-alpine
volumes:
- "redis:/data"
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 20s
timeout: 5s
retries: 20
start_period: 1m
networks:
- internal
cron:
image: alpinelinux/docker-cli:latest
environment:
- STACK_NAME=${STACK_NAME}
volumes:
- /var/run/docker.sock:/var/run/docker.sock
entrypoint: /entrypoint.sh
configs:
- source: cron_entrypoint
target: /entrypoint.sh
mode: 0555
volumes:
app:
postgres:
redis:
configs:
pretix_config:
name: ${STACK_NAME}_pretix_config_${PRETIX_CONFIG_VERSION}
file: pretix.cfg.tmpl
template_driver: golang
cron_entrypoint:
name: ${STACK_NAME}_cron_entrypoint_${CRON_ENTRYPOINT_VERSION}
file: entrypoint.cron.sh
db_entrypoint:
name: ${STACK_NAME}_db_entrypoint_${DB_ENTRYPOINT_VERSION}
file: entrypoint.postgres.sh.tmpl
template_driver: golang
pg_backup:
name: ${STACK_NAME}_pg_backup_${PG_BACKUP_VERSION}
file: pg_backup.sh
networks:
proxy:
external: true
internal:
secrets:
db_password:
external: true
name: ${STACK_NAME}_db_password_${SECRET_DB_PASSWORD_VERSION}
smtp_password:
external: true
name: ${STACK_NAME}_smtp_password_${SECRET_SMTP_PASSWORD_VERSION}
django_secret_key:
external: true
name: ${STACK_NAME}_django_secret_key_${SECRET_DJANGO_SECRET_KEY_VERSION}
admin_pass:
external: true
name: ${STACK_NAME}_admin_pass_${SECRET_ADMIN_PASS_VERSION}