Update: Docker Compose (without Frontend now)
This commit is contained in:
parent
f1ae473b40
commit
bce2237303
12 changed files with 54 additions and 281 deletions
|
|
@ -19,13 +19,17 @@ def create_app():
|
|||
app.config.from_object("config.Config")
|
||||
|
||||
if app.config['SQLALCHEMY_DATABASE_URI_1'] is None or app.config['SQLALCHEMY_DATABASE_URI_2'] is None:
|
||||
print('No ENV Variable for DATABASE_URL_1 or DATABASE_URL_2')
|
||||
print('No ENV Variable for DATABASE_URL_USERS or DATABASE_URL_LOGS')
|
||||
sys.exit(1)
|
||||
else:
|
||||
print('ENV Variables passed : ', app.config['SQLALCHEMY_BINDS'])
|
||||
|
||||
print('init_app')
|
||||
db.init_app(app)
|
||||
with app.app_context():
|
||||
print('import routes')
|
||||
from . import routes
|
||||
print('db.create_all')
|
||||
db.create_all()
|
||||
print('db created')
|
||||
return app
|
||||
|
|
|
|||
|
|
@ -1,19 +1,9 @@
|
|||
print('hashlib')
|
||||
import hashlib
|
||||
|
||||
import os
|
||||
from datetime import datetime
|
||||
|
||||
print('flask_sqlalchemy')
|
||||
from flask_sqlalchemy import inspect
|
||||
|
||||
print('sqlalchemy')
|
||||
from sqlalchemy import asc, desc, or_
|
||||
|
||||
print('users_model')
|
||||
from .users_model import Users, db
|
||||
|
||||
print('logs_model')
|
||||
from .logs_model import Logs
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ from flask import request
|
|||
from .responses import send_message, send_error
|
||||
from .api_functions import db_login, db_register, db_user_update, db_create_log, db_user_delete, db_admin_update_user, db_users
|
||||
from .sessionJWT import create_auth_token, check_auth_token
|
||||
print('route imported')
|
||||
|
||||
|
||||
# Login
|
||||
@app.route('/api/login', methods=['POST'])
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue