navpan2 commited on
Commit
526eb13
·
verified ·
1 Parent(s): c102014

Update bin/gunicorn_start.sh

Browse files
Files changed (1) hide show
  1. bin/gunicorn_start.sh +18 -17
bin/gunicorn_start.sh CHANGED
@@ -1,17 +1,18 @@
1
- #!/bin/bash
2
-
3
- NAME="project_settings" # Name of the application
4
- DJANGODIR=/app # Django project directory
5
- SOCKFILE=/app/run/gunicorn.sock # we will communicte using this unix socket
6
- NUM_WORKERS=3 # how many worker processes should Gunicorn spawn
7
- DJANGO_SETTINGS_MODULE=project_settings.settings # which settings file should Django use
8
- DJANGO_WSGI_MODULE=project_settings.wsgi # WSGI module name
9
-
10
- echo "Starting $NAME as `whoami`"
11
-
12
- # Create the run directory if it doesn't exist
13
- RUNDIR=$(dirname $SOCKFILE)
14
- test -d $RUNDIR || mkdir -p $RUNDIR
15
-
16
- # Start your Django Gunicorn
17
- gunicorn project_settings.wsgi:application --bind=unix:$SOCKFILE --workers $NUM_WORKERS --timeout 600
 
 
1
+ #!/bin/bash
2
+
3
+ NAME="project_settings" # Name of the application
4
+ DJANGODIR=/app # Django project directory
5
+ SOCKFILE=/app/run/gunicorn.sock # we will communicte using this unix socket
6
+ NUM_WORKERS=3 # how many worker processes should Gunicorn spawn
7
+ DJANGO_SETTINGS_MODULE=project_settings.settings # which settings file should Django use
8
+ DJANGO_WSGI_MODULE=project_settings.wsgi # WSGI module name
9
+ PORT=7860 # Specify the port number
10
+
11
+ echo "Starting $NAME as `whoami`"
12
+
13
+ # Create the run directory if it doesn't exist
14
+ RUNDIR=$(dirname $SOCKFILE)
15
+ test -d $RUNDIR || mkdir -p $RUNDIR
16
+
17
+ # Start your Django Gunicorn
18
+ gunicorn project_settings.wsgi:application --bind=0.0.0.0:$PORT --workers $NUM_WORKERS --timeout 600