Use bash script to start server

This commit is contained in:
rubenwardy 2018-03-24 02:36:14 +00:00
parent 6be5b3eb42
commit cd77ad6050
7 changed files with 10 additions and 8 deletions

1
.gitignore vendored

@ -1,4 +1,5 @@
config.cfg
config.prod.cfg
*.sqlite
main.css
tmp

@ -3,9 +3,10 @@ from flask_user import *
import flask_menu as menu
from flask.ext import markdown
from flask_github import GitHub
import os
app = Flask(__name__)
app.config.from_pyfile("../config.cfg")
app.config.from_pyfile(os.environ["FLASK_CONFIG"])
menu.Menu(app=app)
markdown.Markdown(app, extensions=["fenced_code"])

@ -1,3 +0,0 @@
from app import app
app.run(host="127.0.0.1", port=5000, debug=True)

3
rundebug.sh Executable file

@ -0,0 +1,3 @@
#!/bin/bash
FLASK_APP=app/__init__.py FLASK_CONFIG=../config.cfg FLASK_DEBUG=1 python3 -m flask run

@ -1,3 +0,0 @@
from app import app
app.run(host="0.0.0.0", port=5123, debug=False)

3
runprod.sh Executable file

@ -0,0 +1,3 @@
#!/bin/bash
FLASK_APP=app/__init__.py FLASK_CONFIG=../config.prod.cfg FLASK_DEBUG=0 python3 -m flask run -h 0.0.0.0 -p 5123

@ -25,7 +25,7 @@ if not os.path.isfile("db.sqlite"):
jeija = User("Jeija")
jeija.github_username = "Jeija"
db.session.add(jeija)
sam = User("fillthisinlater")
sam.github_username = "fillthisinlater"
sam.rank = UserRank.EDITOR