Files
pretix_original/deployment/docker/pretix.bash
Raphael Michel f0a06cd9fe Replace SCSS compilation with CSS variables (#4191)
* Replace SCSS compilation with CSS variables

* Update tests

* Update src/pretix/presale/style.py

Co-authored-by: Mira <weller@rami.io>

* Update src/pretix/presale/context.py

Co-authored-by: Mira <weller@rami.io>

* Update src/pretix/presale/views/widget.py

Co-authored-by: Mira <weller@rami.io>

* Update src/pretix/presale/context.py

Co-authored-by: Mira <weller@rami.io>

* Update src/pretix/static/pretixbase/scss/_variables.scss

Co-authored-by: Richard Schreiber <schreiber@rami.io>

* Last minor changes

* Rename file

---------

Co-authored-by: Mira <weller@rami.io>
Co-authored-by: Richard Schreiber <schreiber@rami.io>
2024-06-25 13:01:20 +02:00

54 lines
1.1 KiB
Bash

#!/bin/bash
cd /pretix/src
export DJANGO_SETTINGS_MODULE=production_settings
export DATA_DIR=/data/
export HOME=/pretix
AUTOMIGRATE=${AUTOMIGRATE:-yes}
NUM_WORKERS_DEFAULT=$((2 * $(nproc)))
export NUM_WORKERS=${NUM_WORKERS:-$NUM_WORKERS_DEFAULT}
if [ ! -d /data/logs ]; then
mkdir /data/logs;
fi
if [ ! -d /data/media ]; then
mkdir /data/media;
fi
if [ "$1" == "cron" ]; then
exec python3 -m pretix runperiodic
fi
if [ "$AUTOMIGRATE" != "skip" ]; then
python3 -m pretix migrate --noinput
fi
if [ "$1" == "all" ]; then
exec sudo -E /usr/bin/supervisord -n -c /etc/supervisord.all.conf
fi
if [ "$1" == "web" ]; then
exec sudo -E /usr/bin/supervisord -n -c /etc/supervisord.web.conf
fi
if [ "$1" == "webworker" ]; then
exec gunicorn pretix.wsgi \
--name pretix \
--workers $NUM_WORKERS \
--max-requests 1200 \
--max-requests-jitter 50 \
--log-level=info \
--bind=unix:/tmp/pretix.sock
fi
if [ "$1" == "taskworker" ]; then
shift
exec celery -A pretix.celery_app worker -l info "$@"
fi
if [ "$1" == "upgrade" ]; then
exec python3 -m pretix updateassets
fi
exec python3 -m pretix "$@"