updated Dockerfile

This commit is contained in:
Marvin Zhang
2019-06-11 08:08:58 +08:00
parent 85baadc951
commit 6e215f2de2

View File

@@ -1,7 +1,17 @@
#!/bin/sh
cd /opt/crawlab/frontend \
&& npm run build:prod \
&& mongod --fork --logpath /var/log/mongod.log \
&& service nginx start \
&& service redis-server start \
&& python3 $WORK_DIR/manage.py $*
case $1 in
master)
cd /opt/crawlab/frontend \
&& npm run build:prod \
&& service nginx start \
&& mongod --fork --logpath /var/log/mongod.log
redis-server >> /var/log/redis-server.log 2>&1 &
python $WORK_DIR/crawlab/flower.py >> /opt/crawlab/flower.log 2>&1 &
python $WORK_DIR/crawlab/worker.py >> /opt/crawlab/worker.log 2>&1 &
python $WORK_DIR/crawlab/app.py
;;
worker)
python $WORK_DIR/crawlab/app.py >> /opt/crawlab/app.log 2>&1 &
python $WORK_DIR/crawlab/worker.py
;;
esac