-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.py
22 lines (18 loc) · 945 Bytes
/
main.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
from manageablereverseproxy import REPO_DIR
from manageablereverseproxy.logger import InheritLogger
from manageablereverseproxy.app import create_app
from manageablereverseproxy.db import db
from manageablereverseproxy.components.firewall_ip import app_add_firewall_ip_module
from manageablereverseproxy.components.authentication import app_add_authentication_module, require_auth
from manageablereverseproxy.components.reverseproxy import app_add_reverseproxy_module
if __name__ == "__main__":
app = create_app()
InheritLogger.set_lgr_level(0)
with app.app_context():
app.config['SQLALCHEMY_DATABASE_URI'] = f"sqlite:///{str(REPO_DIR / 'assets/test.db')}"
app.config['SQLALCHEMY_TRACK_MODIFICATIONS'] = False
db.init_app(app)
app_add_firewall_ip_module(app)
app_add_authentication_module(app)
app_add_reverseproxy_module(app)
app.run(host="0.0.0.0", debug=True, port=8000)