Update bin/gunicorn_start.sh
Browse files- 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 |
-
|
11 |
-
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
|
|
|
|
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
|