Deployment improvements
This commit is contained in:
parent
5d9f9e92ae
commit
9a5210a656
|
@ -17,4 +17,4 @@ if __name__ == "__main__":
|
|||
response.headers['Access-Control-Allow-Methods'] = 'GET, POST, OPTIONS'
|
||||
return response
|
||||
|
||||
app.run(host='0.0.0.0', port=12345)
|
||||
app.run(port=12345)
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
from flask import Flask, request
|
||||
import sys
|
||||
import json
|
||||
import string
|
||||
import random
|
||||
|
@ -6,7 +7,7 @@ import atexit
|
|||
|
||||
app = Flask(__name__)
|
||||
|
||||
filename = 'db.json'
|
||||
filename = sys.argv[1] if len(sys.argv) > 1 else 'db.json'
|
||||
id_length = 16
|
||||
|
||||
data = {}
|
||||
|
|
|
@ -18,8 +18,11 @@ pidfile="/var/run/${name}.pid"
|
|||
task="/usr/local/bin/python3.7 -m fs-quiz-tool-db"
|
||||
procname="/usr/local/bin/python3.7"
|
||||
|
||||
command="/usr/sbin/daemon"
|
||||
command_args="-p ${pidfile} ${task}"
|
||||
dbfile="/var/fs-quiz-tool/db.json"
|
||||
task="/usr/local/bin/python3.7 -m fs-quiz-tool-db ${dbfile}"
|
||||
procname="/usr/local/bin/python3.7"
|
||||
|
||||
sig_stop="INT"
|
||||
|
||||
load_rc_config ${name}
|
||||
run_rc_command "$1"
|
||||
|
|
Loading…
Reference in New Issue