Correct Docker Compose
This commit is contained in:
@@ -41,8 +41,7 @@ def API():
|
||||
################
|
||||
|
||||
if __name__ == "__main__":
|
||||
# Create a thread that will run the run_schedule function in the background
|
||||
log_event("Starting API...")
|
||||
log_event("Starting API...") # Create a thread that will run the run_schedule function in the background
|
||||
scheduler = CONFIG["server"]["scheduler"]
|
||||
scheduler = False if scheduler.lower() == 'false' else True
|
||||
if scheduler:
|
||||
|
||||
@@ -4,4 +4,4 @@
|
||||
import configparser
|
||||
|
||||
CONFIG = configparser.ConfigParser()
|
||||
CONFIG.read("bank.ini")
|
||||
CONFIG.read("./bank.ini")
|
||||
|
||||
@@ -5,8 +5,14 @@ from config import CONFIG # Import Config
|
||||
from sqlalchemy import create_engine
|
||||
from sqlalchemy.orm import sessionmaker
|
||||
|
||||
db_url : str = f"{CONFIG['database']['type']}://{CONFIG['database']['user']}:{CONFIG['database']['password']}@{CONFIG['database']['ip']}:{CONFIG['database']['port']}/{CONFIG['database']['name']}"
|
||||
print(f"Database URL set to: {db_url}")
|
||||
db_type = CONFIG.get('database', 'type')
|
||||
db_user = CONFIG.get('database', 'user')
|
||||
db_password = CONFIG.get('database', 'password')
|
||||
db_ip = CONFIG.get('database', 'ip')
|
||||
db_port = CONFIG.get('database', 'port')
|
||||
db_name = CONFIG.get('database', 'name')
|
||||
|
||||
db_url : str = f"{db_type}://{db_user}:{db_password}@{db_ip}:{db_port}/{db_name}"
|
||||
|
||||
engine = create_engine(db_url, echo=True) # Creates the database engine
|
||||
|
||||
|
||||
9
server/requirements.txt
Normal file
9
server/requirements.txt
Normal file
@@ -0,0 +1,9 @@
|
||||
flask
|
||||
connexion[swagger-ui]==2.14.2
|
||||
requests
|
||||
sqlalchemy
|
||||
flask-session
|
||||
faker
|
||||
customtkinter
|
||||
schedule
|
||||
psycopg2
|
||||
Reference in New Issue
Block a user