15 Commits

Author SHA1 Message Date
57b2b21353 increase healthcheck retries
Some checks failed
continuous-integration/drone/push Build is failing
2025-12-23 14:39:33 +01:00
8b48069197 chore: publish 2.3.0+2025.10.0 release
Some checks failed
continuous-integration/drone/tag Build is passing
continuous-integration/drone/push Build is failing
2025-12-03 23:34:07 +01:00
3e25010062 chore: publish 2.2.0+2025.8.0 release
All checks were successful
continuous-integration/drone/tag Build is passing
continuous-integration/drone/push Build is passing
2025-10-11 21:07:04 +02:00
93b40b1e29 fix: update cron template version
All checks were successful
continuous-integration/drone/push Build is passing
Fixes a regression introduced in d67f375d47
2025-10-11 21:02:34 +02:00
f277fe7070 Merge pull request 'fix(cron): make sure cron container only returns one container id' (#1) from kolaente/pretix:fix/cron into main
All checks were successful
continuous-integration/drone/push Build is passing
Reviewed-on: #1
Reviewed-by: simon <simon@noreply.git.coopcloud.tech>
2025-10-02 12:06:03 +00:00
13077bb2a4 Merge pull request 'fix: remove languages from set' (#3) from feat/lang into main
All checks were successful
continuous-integration/drone/push Build is passing
Reviewed-on: #3
2025-10-02 11:20:44 +00:00
0dc4c7f70f fix: remove languages from set 2025-09-30 21:01:59 +02:00
d67f375d47 fix: 2025-09-29 20:20:28 +00:00
2590fd1343 chore: publish 2.1.0+2025.5.0 release
All checks were successful
continuous-integration/drone/push Build is passing
continuous-integration/drone/tag Build is passing
2025-06-12 10:44:48 +02:00
1347ac8984 chore: publish 2.0.0+2025.1.0 release
All checks were successful
continuous-integration/drone/tag Build is passing
continuous-integration/drone/push Build is passing
2025-02-11 21:01:12 +01:00
fffc1c1459 chore: publish 1.6.0+2025.1.0 release
All checks were successful
continuous-integration/drone/tag Build is passing
continuous-integration/drone/push Build is passing
2025-02-11 19:12:31 +01:00
292619f299 chore: publish 1.5.0+2024.11.0 release
All checks were successful
continuous-integration/drone/tag Build is passing
continuous-integration/drone/push Build is passing
2025-02-11 18:54:51 +01:00
bf442edf8e Update .drone.yml
All checks were successful
continuous-integration/drone/push Build is passing
2025-01-08 10:09:13 -08:00
bed55cd28a chore: publish 1.4.1+2024.11.0 release
All checks were successful
continuous-integration/drone/tag Build is passing
continuous-integration/drone/push Build is passing
2024-12-14 04:35:20 +01:00
9b0965c240 chore: publish 1.4.0+2024.11.0 release
All checks were successful
continuous-integration/drone/tag Build is passing
continuous-integration/drone/push Build is passing
2024-12-14 02:23:15 +01:00
9 changed files with 47 additions and 27 deletions

View File

@ -24,6 +24,7 @@ steps:
SECRET_SMTP_PASSWORD_VERSION: v1
PRETIX_CONFIG_VERSION: v1
PG_BACKUP_VERSION: v1
SECRET_ADMIN_PASS_VERSION: v1
trigger:
branch:
- main
@ -39,7 +40,7 @@ steps:
from_secret: drone_abra-bot_token
fork: true
repositories:
- coop-cloud/auto-recipes-catalogue-json
- toolshed/auto-recipes-catalogue-json
trigger:
event: tag

View File

@ -7,9 +7,11 @@ DOMAIN=pretix.example.com
LETS_ENCRYPT_ENV=production
ENABLE_BACKUPS=true
POST_DEPLOY_CMDS="app change_admin_pass"
SECRET_DB_PASSWORD_VERSION=v1
SECRET_DJANGO_SECRET_KEY_VERSION=v1
SECRET_ADMIN_PASS_VERSION=v1
SECRET_SMTP_PASSWORD_VERSION=v1
SMTP_FROM=hello@localhost

16
abra.sh
View File

@ -1,8 +1,16 @@
export PRETIX_CONFIG_VERSION=v1
export CRON_ENTRYPOINT_VERSION=v1
export DB_ENTRYPOINT_VERSION=v1
export PRETIX_CONFIG_VERSION=v2
export CRON_ENTRYPOINT_VERSION=v2
export DB_ENTRYPOINT_VERSION=v2
export PG_BACKUP_VERSION=v1
change_adminpass(){
python -m django changepassword admin@localhost
password=$(cat /run/secrets/admin_pass)
~/src/manage.py shell -c """
from django.contrib.auth import get_user_model
UserModel = get_user_model()
u = UserModel.objects.get(email='admin@localhost')
u.set_password('$password')
u.save()
"""
echo "Changed admin password"
}

View File

@ -3,7 +3,7 @@ version: "3.8"
services:
app:
image: 'pretix/standalone:2024.10.0'
image: "pretix/standalone:2025.10.0"
networks:
- proxy
- internal
@ -16,6 +16,7 @@ services:
- db_password
- smtp_password
- django_secret_key
- admin_pass
deploy:
restart_policy:
condition: on-failure
@ -25,16 +26,16 @@ services:
- "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.3.0+2024.10.0"
- "coop-cloud.${STACK_NAME}.version=2.3.0+2025.10.0"
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost/healthcheck"]
interval: 30s
timeout: 10s
retries: 10
retries: 30
start_period: 1m
db:
image: postgres:12
image: postgres:16
volumes:
- "postgres:/var/lib/postgresql/data"
networks:
@ -52,29 +53,34 @@ services:
- source: db_entrypoint
target: /docker-entrypoint.sh
mode: 0555
entrypoint:
/docker-entrypoint.sh
entrypoint: /docker-entrypoint.sh
healthcheck:
test: ["CMD-SHELL", "[ -f $${HEALTHCHECK_MARKER} ] || pg_isready -d $${POSTGRES_DB} -U $${POSTGRES_USER}"]
interval: 10s
test:
[
"CMD-SHELL",
"[ -f $${HEALTHCHECK_MARKER} ] || pg_isready -d $${POSTGRES_DB} -U $${POSTGRES_USER}",
]
interval: 30s
timeout: 5s
retries: 5
retries: 20
start_period: 1m
deploy:
labels:
backupbot.backup: "${ENABLE_BACKUPS:-true}"
backupbot.backup.pre-hook: "/pg_backup.sh backup"
backupbot.backup.pre-hook: "/pg_backup.sh backup"
backupbot.backup.volumes.postgres.path: "backup.sql"
backupbot.restore.post-hook: '/pg_backup.sh restore'
backupbot.restore.post-hook: "/pg_backup.sh restore"
redis:
image: redis:7.0.10-alpine
image: redis:8.0.2-alpine
volumes:
- "redis:/data"
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 3s
interval: 20s
timeout: 5s
retries: 20
start_period: 1m
networks:
- internal
@ -84,8 +90,7 @@ services:
- STACK_NAME=${STACK_NAME}
volumes:
- /var/run/docker.sock:/var/run/docker.sock
entrypoint:
/entrypoint.sh
entrypoint: /entrypoint.sh
configs:
- source: cron_entrypoint
target: /entrypoint.sh
@ -117,7 +122,6 @@ networks:
external: true
internal:
secrets:
db_password:
external: true
@ -128,3 +132,6 @@ secrets:
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}

View File

@ -1,3 +1,3 @@
#!/bin/sh
echo '15,45 * * * * docker exec $(docker ps -qf 'name=${STACK_NAME}_app') pretix runperiodic' | crontab - && crond -f -d 8
echo '15,45 * * * * docker exec $(docker ps -qf 'name=^${STACK_NAME}_app') pretix runperiodic' | crontab - && crond -f -d 8

View File

@ -53,15 +53,18 @@ if [ -f $PGDATA/PG_VERSION ]; then
install_old_postgres_debian
fi
echo "shuffling around"
gosu postgres mkdir $OLDDATA $NEWDATA
chmod 700 $OLDDATA $NEWDATA
gosu postgres mkdir $OLDDATA
chmod 700 $OLDDATA
mv $PGDATA/* $OLDDATA/ || true
gosu postgres mkdir $NEWDATA
chmod 700 $NEWDATA
touch $MIGRATION_MARKER
echo "running initdb"
# abuse entrypoint script for initdb by making server error out
gosu postgres bash -c "export PGDATA=$NEWDATA ; /usr/local/bin/docker-entrypoint.sh --invalid-arg || true"
echo "running pg_upgrade"
cd /tmp
sleep 5
gosu postgres pg_upgrade --link -b /tmp/pgenv/pgsql-$LATEST_OLD_VERSION/bin -d $OLDDATA -D $NEWDATA -U $POSTGRES_USER
cp $OLDDATA/pg_hba.conf $NEWDATA/
mv $NEWDATA/* $PGDATA

View File

@ -42,9 +42,6 @@ debug=off
location=redis://redis:6379/1
sessions=true
[languages]
enabled=en,de
[celery]
backend=redis://redis:6379/1
broker=redis://redis:6379/2

1
release/1.5.0+2024.11.0 Normal file
View File

@ -0,0 +1 @@
New major postgres version with automated update script! Make sure to backup your database before.

1
release/2.0.0+2025.1.0 Normal file
View File

@ -0,0 +1 @@
New secret ADMIN_PASS which will be used to automatically replace the insecure default password