Commit fbffbe0a authored by david's avatar david

update deploy script

parent 15dbf5ac
...@@ -12,8 +12,8 @@ for i in "${!array[@]}"; do ...@@ -12,8 +12,8 @@ for i in "${!array[@]}"; do
ssh ubuntu@${array[i]} "source ~/Env/oa/bin/activate && pip install -r ~/OpenAgua/requirements.txt" ssh ubuntu@${array[i]} "source ~/Env/oa/bin/activate && pip install -r ~/OpenAgua/requirements.txt"
ssh ubuntu@${array[i]} "sudo cd ~/OpenAgua && yarn install" ssh ubuntu@${array[i]} "sudo cd ~/OpenAgua && yarn install"
# 2. copy build files to server # 2. copy build files to server
rsync -avzh ./openagua/static/dist ubuntu@${array[i]}:/home/ubuntu/OpenAgua/openagua/static/dist rsync -avzh ssh ./openagua/static/dist ubuntu@${array[i]}:/home/ubuntu/OpenAgua/openagua/static/dist
rsync -avzh ./openagua/templates/dist ubuntu@${array[i]}:/home/ubuntu/OpenAgua/openagua/templates/dist rsync -avzh ssh ./openagua/templates/dist ubuntu@${array[i]}:/home/ubuntu/OpenAgua/openagua/templates/dist
# 3. restart server # 3. restart server
ssh ubuntu@${array[i]} "source ~/Env/oa/bin/activate && sudo killall -9 gunicorn && cd ~/OpenAgua && gunicorn -k geventwebsocket.gunicorn.workers.GeventWebSocketWorker -w 1 -b :5000 openagua:app --daemon" ssh ubuntu@${array[i]} "source ~/Env/oa/bin/activate && sudo killall -9 gunicorn && cd ~/OpenAgua && gunicorn -k geventwebsocket.gunicorn.workers.GeventWebSocketWorker -w 1 -b :5000 openagua:app --daemon"
done done
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment