Add scripts for production, README

This commit is contained in:
David Hoppenbrouwers
2022-10-09 18:17:15 +02:00
parent 1c12ed478e
commit 64972e6b49
7 changed files with 100 additions and 9 deletions

20
run_sqlite.sh Executable file
View File

@@ -0,0 +1,20 @@
#!/usr/bin/env bash
set -e
if [ ! -e venv ]
then
echo "venv not found, did you run make?" >&2
exit 1
fi
if [ $# != 2 ]
then
echo "Usage: $0 <file.db> <pid file>" >&2
exit 1
fi
export DB="$1"
export SERVER=gunicorn
export PID="$2"
exec gunicorn -w 4 'main:app' --pid="$PID" -b 0.0.0.0:8000