mirror of
https://gitea.mueller.network/extern/django-helpdesk.git
synced 2024-11-22 16:03:19 +01:00
23 lines
699 B
Bash
23 lines
699 B
Bash
|
#!/bin/bash
|
||
|
cd /opt/django-helpdesk/standalone/
|
||
|
if python manage.py showmigrations | grep '\[ \]\|^[a-z]' | grep '[ ]' -B 1; then
|
||
|
python manage.py migrate --noinput # Apply database migrations
|
||
|
fi
|
||
|
|
||
|
# Starting cron to check emails
|
||
|
printenv > /etc/env
|
||
|
env | awk -F= '{printf "export %s=\"%s\"\n", $1, $2}' > /etc/env
|
||
|
cron &&
|
||
|
# Start Gunicorn processes
|
||
|
echo Starting Gunicorn.
|
||
|
exec gunicorn standalone.config.wsgi:application \
|
||
|
--name django-helpdesk \
|
||
|
--bind 0.0.0.0:${GUNICORN_PORT:-"8000"} \
|
||
|
--workers ${GUNICORN_NUM_WORKERS:-"6"} \
|
||
|
--timeout ${GUNICORN_TIMEOUT:-"60"} \
|
||
|
--preload \
|
||
|
--log-level=debug \
|
||
|
--log-file=- \
|
||
|
--access-logfile=- \
|
||
|
"$@"
|