Add scripts for production, README
This commit is contained in:
27
restart.sh
27
restart.sh
@@ -1,4 +1,27 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# This script is intended for dev environments only.
|
||||
touch main.py
|
||||
set -e
|
||||
|
||||
if [ -z "$SERVER" ]
|
||||
then
|
||||
echo "SERVER is not set" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
case "$SERVER" in
|
||||
dev)
|
||||
touch main.py
|
||||
;;
|
||||
gunicorn)
|
||||
if [ -z "$PID" ]
|
||||
then
|
||||
echo "PID is not set" >&2
|
||||
exit 1
|
||||
fi
|
||||
kill -hup $(cat "$PID")
|
||||
;;
|
||||
*)
|
||||
echo "Unsupported $SERVER" >&2
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
Reference in New Issue
Block a user