diff options
-rw-r--r-- | .gitignore | 1 | ||||
-rw-r--r-- | app/__init__.py | 3 | ||||
-rw-r--r-- | rundebug.py | 3 | ||||
-rwxr-xr-x | rundebug.sh | 3 | ||||
-rw-r--r-- | runprod.py | 3 | ||||
-rwxr-xr-x | runprod.sh | 3 | ||||
-rw-r--r-- | setup.py | 2 |
7 files changed, 10 insertions, 8 deletions
@@ -1,4 +1,5 @@ config.cfg +config.prod.cfg *.sqlite main.css tmp diff --git a/app/__init__.py b/app/__init__.py index 1031c93..d9c2b38 100644 --- a/app/__init__.py +++ b/app/__init__.py @@ -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"]) diff --git a/rundebug.py b/rundebug.py deleted file mode 100644 index 292c33f..0000000 --- a/rundebug.py +++ /dev/null @@ -1,3 +0,0 @@ -from app import app - -app.run(host="127.0.0.1", port=5000, debug=True) diff --git a/rundebug.sh b/rundebug.sh new file mode 100755 index 0000000..2427059 --- /dev/null +++ b/rundebug.sh @@ -0,0 +1,3 @@ +#!/bin/bash + +FLASK_APP=app/__init__.py FLASK_CONFIG=../config.cfg FLASK_DEBUG=1 python3 -m flask run diff --git a/runprod.py b/runprod.py deleted file mode 100644 index 9132b74..0000000 --- a/runprod.py +++ /dev/null @@ -1,3 +0,0 @@ -from app import app - -app.run(host="0.0.0.0", port=5123, debug=False) diff --git a/runprod.sh b/runprod.sh new file mode 100755 index 0000000..9951516 --- /dev/null +++ b/runprod.sh @@ -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 |