Server Config
This commit is contained in:
@ -1 +1 @@
|
||||
25454
|
||||
18291
|
||||
|
||||
6
init.py
6
init.py
@ -3,6 +3,7 @@ from flask_login import LoginManager, UserMixin
|
||||
from flask_sqlalchemy import SQLAlchemy
|
||||
from flask_talisman import Talisman
|
||||
from sqlalchemy import ForeignKey
|
||||
import sys
|
||||
|
||||
from getMySQL import getMySQL
|
||||
import atexit
|
||||
@ -18,7 +19,10 @@ def create(testing: bool = False):
|
||||
dbpw = getMySQL()[1]
|
||||
dbun = getMySQL()[0]
|
||||
|
||||
app.config['SECRET_KEY'] = 'SECRET_KEY_GOES_HERE'
|
||||
try:
|
||||
app.config['SECRET_KEY'] = sys.argv[1] # Den Secret Key bei Start mitgeben: routing.py SECRET_KEY_GOES HERE
|
||||
except IndexError:
|
||||
app.config['SECRET_KEY'] = "SECRET-KEY-GOES-HERE"
|
||||
app.config['SQLALCHEMY_DATABASE_URI'] = 'mysql+pymysql://' + dbun + ':' + dbpw + '@localhost/paulmrtn_DUALHUB'
|
||||
db.init_app(app)
|
||||
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
[uwsgi]
|
||||
mount = /dualhub=routing:app
|
||||
mount = /dualhub=routing:flaskApp
|
||||
manage-script-name = true
|
||||
pidfile = dualhub_flask.pid
|
||||
master = true
|
||||
@ -8,4 +8,4 @@ http-socket = :2024
|
||||
chmod-socket = 660
|
||||
vacuum = true
|
||||
enable-threads = true
|
||||
thunder-lock = true
|
||||
thunder-lock = true
|
||||
|
||||
Reference in New Issue
Block a user