AstroJS/setup/docker.start

34 lines
675 B
Bash

#!/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
uwsgi \
--plugins-dir /usr/lib/uwsgi/ --need-plugin python \
--http-socket :5000 \
--wsgi-file main.py \
--callable application --master \
--processes 1 --threads 2
;;
"tasks")
source "$INST_DIR/celery.conf"
celery worker -n worker1@%h \
-A ${CELERY_APP} \
--loglevel=${CELERYD_LOG_LEVEL} ${CELERYD_OPTS} \
& celery worker -n worker1@%h \
-A ${CELERY_APP} \
--loglevel=${CELERYD_LOG_LEVEL} ${CELERYD_OPTS}
;;
*)
echo "RUN_MODE is missing"
exit 1
;;
esac