mirror of
https://github.com/haiwen/seahub.git
synced 2025-04-26 18:40:53 +00:00
Update .gitignore
This commit is contained in:
parent
3dcdb7aec2
commit
f9c46485d6
12
.gitignore
vendored
12
.gitignore
vendored
@ -16,17 +16,29 @@ settings.py.mysql
|
||||
settings.py.sqlite
|
||||
secret_key.py
|
||||
run-seahub.sh
|
||||
|
||||
# setenv
|
||||
setenv.sh
|
||||
setenv*.sh
|
||||
|
||||
pylintrc
|
||||
.DS_Store
|
||||
*.mo
|
||||
media/CACHE
|
||||
media/custom
|
||||
|
||||
# media/avatars
|
||||
media/avatars/*
|
||||
!media/avatars/default-non-register.jpg
|
||||
!media/avatars/default.png
|
||||
!media/default.jpg
|
||||
!media/groups/default.jpg
|
||||
|
||||
# bin/
|
||||
bin/*
|
||||
!bin/start.template
|
||||
!bin/restart.template
|
||||
|
||||
static/scripts/dist
|
||||
logs/
|
||||
mysite.pid
|
||||
|
33
bin/restart.template
Executable file
33
bin/restart.template
Executable file
@ -0,0 +1,33 @@
|
||||
#!/bin/bash
|
||||
|
||||
|
||||
PROJDIR="/home/ubuntu/seahub"
|
||||
PIDFILE="$PROJDIR/mysite.pid"
|
||||
|
||||
#kill -HUP `cat -- $PIDFILE`
|
||||
|
||||
cd $PROJDIR
|
||||
|
||||
if [ -f $PIDFILE ]; then
|
||||
echo "Killing seahub python processes ..."
|
||||
PID=`cat -- $PIDFILE`
|
||||
echo "Parent process: $PID"
|
||||
echo "Child processes:" `pgrep -P $PID`
|
||||
|
||||
kill `cat -- $PIDFILE`
|
||||
rm -f -- $PIDFILE
|
||||
|
||||
sleep 5
|
||||
fi
|
||||
|
||||
echo ""
|
||||
echo "Starting seahub gunicorn ..."
|
||||
./start.template
|
||||
sleep 2
|
||||
|
||||
if [ -f $PIDFILE ]; then
|
||||
echo "Done."
|
||||
PID=`cat -- $PIDFILE`
|
||||
echo "New seahub parent process: $PID"
|
||||
echo "Child processes:" `pgrep -P $PID`
|
||||
fi
|
18
bin/start.template
Executable file
18
bin/start.template
Executable file
@ -0,0 +1,18 @@
|
||||
#!/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
|
Loading…
Reference in New Issue
Block a user