Server Config

This commit is contained in:
2024-06-18 12:20:42 +02:00
parent 0fb8d0d4bc
commit b0bda20baa
3 changed files with 8 additions and 4 deletions

View File

@ -1 +1 @@
25454
18291

View File

@ -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)

View File

@ -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