nginx-template / run.sh
xarical's picture
Add post-execution cleanup to run.sh, add static route
ab6b332
raw
history blame contribute delete
343 Bytes
#!/bin/bash
# start nginx
service nginx start
# start the processes
python -m http.server --directory ./static --bind 0.0.0.0 8000 & echo $! > http_server.pid
python api.py & echo $!> api.pid
python app.py # blocking
# when unblocked, kill other processes and clean up
pkill -F http_server.pid
pkill -F api.pid
rm http_server.pid
rm api.pid