forked from Botanical/BotanJS
33 lines
653 B
Plaintext
33 lines
653 B
Plaintext
|
#!/bin/bash
|
||
|
|
||
|
INST_DIR=$( dirname "${BASH_SOURCE[0]}" )
|
||
|
source "$INST_DIR/config"
|
||
|
cd $PROJ_ROOT
|
||
|
|
||
|
mkdir -p cache/botanjs
|
||
|
|
||
|
case "$RUN_MODE" in
|
||
|
"web")
|
||
|
./botan-rebuild.py
|
||
|
./env/bin/uwsgi \
|
||
|
--http-socket :5000 \
|
||
|
--wsgi-file main.py \
|
||
|
--callable application --master \
|
||
|
--processes 1 --threads 2
|
||
|
;;
|
||
|
"tasks")
|
||
|
source "$INST_DIR/celery.conf"
|
||
|
|
||
|
"$BIN_ROOT/celery" worker -n worker1@%h \
|
||
|
-A ${CELERY_APP} \
|
||
|
--loglevel=${CELERYD_LOG_LEVEL} ${CELERYD_OPTS} \
|
||
|
& "$BIN_ROOT/celery" worker -n worker1@%h \
|
||
|
-A ${CELERY_APP} \
|
||
|
--loglevel=${CELERYD_LOG_LEVEL} ${CELERYD_OPTS}
|
||
|
;;
|
||
|
*)
|
||
|
echo "RUN_MODE is missing"
|
||
|
exit 1
|
||
|
;;
|
||
|
esac
|