Files
pretix/compose.yml
Moritz 820523773d
Some checks reported errors
continuous-integration/drone/push Build encountered an error
update postgres from 12 to 13
2024-10-24 16:43:49 +02:00

107 lines
2.6 KiB
YAML

---
version: "3.8"
services:
app:
image: 'pretix/standalone:2024.1.0'
networks:
- proxy
- internal
volumes:
- app:/data
configs:
- source: pretix_config
target: /etc/pretix/pretix.cfg
secrets:
- db_password
- smtp_password
- django_secret_key
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=1.0.0+2024.1.0"
# healthcheck:
# test: ["CMD", "curl", "-f", "http://localhost"]
# interval: 30s
# timeout: 10s
# retries: 10
# start_period: 1m
db:
image: postgres:13
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
healthcheck:
test: ["CMD-SHELL", "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'
backupbot.backup.volumes.redis: "false"
configs:
- source: pg_backup
target: /pg_backup.sh
mode: 0555
redis:
image: redis:7.0.10-alpine
volumes:
- "redis:/data"
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 3s
timeout: 5s
retries: 20
networks:
- internal
volumes:
app:
postgres:
redis:
configs:
pretix_config:
name: ${STACK_NAME}_pretix_config_${PRETIX_CONFIG_VERSION}
file: pretix.cfg.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}