1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-04-27 02:51:00 +00:00
seahub/bin/start.template
2018-12-06 14:02:56 +08:00

19 lines
803 B
Bash
Executable File

#!/bin/bash
NAME=Seahub
DJANGODIR=/home/ubuntu/seahub/ # Django project directory
PID_FILE=${DJANGODIR}mysite.pid
NUM_WORKERS=3 # how many worker processes should Gunicorn spawn
DJANGO_SETTINGS_MODULE=seahub.settings # which settings file should Django use
DJANGO_WSGI_MODULE=seahub.wsgi:application # WSGI module name
cd $DJANGODIR
source ~/.virtualenvs/6.3/bin/activate # Activate the virtual environment
. setenv.sh # Set ccnet/seafiel env, and related python path
export DJANGO_SETTINGS_MODULE=$DJANGO_SETTINGS_MODULE
export LANG=en_US.UTF-8
export LC_ALL=en_US.UTF-8
export LC_LANG=en_US.UTF-8
gunicorn ${DJANGO_WSGI_MODULE} --workers $NUM_WORKERS --log-level=debug --access-logfile=/tmp/gunicorn-access.log --error-logfile=/tmp/gunicorn-error.log --pid=${PID_FILE} --daemon --preload