Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gunicorn unrecognized arguments #5

Open
ankee2050 opened this issue Apr 7, 2020 · 0 comments
Open

gunicorn unrecognized arguments #5

ankee2050 opened this issue Apr 7, 2020 · 0 comments

Comments

@ankee2050
Copy link

Hi Hardik,
I am stuck at starting the gunicorn service using shell script you provided.
I am getting below error-
gunicorn: error: unrecognized arguments: ubuntu /home/ubuntu/ankit/ems/run/gunicorn.sock

Here are the script details-

#!/bin/bash

NAME="ems"
DJANGODIR=/home/ubuntu/ankit/ems-
SOCKFILE=/home/ubuntu/ankit/ems-/run/gunicorn.sock
USER=ubuntu
GROUP=ubuntu
NUM_WORKERS=3
DJANGO_SETTINGS_MODULE=ems.settings
DJANGO_WSGI_MODULE=ems.wsgi

echo "Starting $NAME as whoami"

Activate the virtual environment

cd $DJANGODIR
source ../venv/bin/activate
export DJANGO_SETTINGS_MODULE=$DJANGO_SETTINGS_MODULE
export PYTHONPATH=$DJANGODIR:$PYTHONPATH

Create the run directory if it doesn't exist

RUNDIR=$(dirname $SOCKFILE)
test -d $RUNDIR || mkdir -p $RUNDIR

Start your Django Unicorn

Programs meant to be run under supervisor should not daemonize themselves (do not use --daemon)

exec /home/ubuntu/ankit/venv/bin/gunicorn ${DJANGO_WSGI_MODULE}:application
--name $NAME
--workers $NUM_WORKERS
--user = $USER --group=$GROUP
--bind = $SOCKFILE
--log-level=debug
--log-file=-

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant