pretix/compose.yml
carla 2590fd1343
All checks were successful
continuous-integration/drone/push Build is passing
continuous-integration/drone/tag Build is passing
chore: publish 2.1.0+2025.5.0 release
2025-06-12 10:44:48 +02:00

134 lines
3.4 KiB
YAML

---
version: "3.8"
services:
app:
image: 'pretix/standalone:2025.5.0'
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: on-failure
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.1.0+2025.5.0"
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost/healthcheck"]
interval: 30s
timeout: 10s
retries: 10
start_period: 1m
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: 10s
timeout: 5s
retries: 5
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.0.2-alpine
volumes:
- "redis:/data"
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 3s
timeout: 5s
retries: 20
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}