forked from Botanical/BotanJS
Added settings for k8s
This commit is contained in:
32
setup/docker.start
Normal file
32
setup/docker.start
Normal file
@@ -0,0 +1,32 @@
|
||||
#!/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
|
Reference in New Issue
Block a user