File: docker-entrypoint.sh

package info (click to toggle)
django-qr-code 4.2.0-1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 2,108 kB
  • sloc: python: 3,914; sh: 107; makefile: 20
file content (21 lines) | stat: -rwxr-xr-x 561 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#!/bin/bash

echo APP_PORT=$APP_PORT
echo DJANGO_SETTINGS_MODULE=$DJANGO_SETTINGS_MODULE

# Collect static files first.
python3 manage.py collectstatic --noinput


echo --- Start Gunicorn processes and replace the shell [i.e. invoke gunicorn with exec]
echo Starting Gunicorn.
exec gunicorn demo_site.wsgi:application \
    --name django-qr-code \
    --bind 0.0.0.0:$APP_PORT \
    --workers 2 \
    --worker-class=gthread \
    --log-level=info \
    --log-file=- \
    --access-logfile=- \
    --env DJANGO_SETTINGS_MODULE=$DJANGO_SETTINGS_MODULE \
    "$@"