Docker buid issue
This commit is contained in:
@ -42,8 +42,9 @@ def create_app():
|
||||
if not all([mysql_host, mysql_user, mysql_password, mysql_db]):
|
||||
raise ValueError("Missing required MySQL environment variables")
|
||||
|
||||
# FIXED: Use port 3306 (internal Docker port, not the host port 3307)
|
||||
app.config['SQLALCHEMY_DATABASE_URI'] = (
|
||||
f'mysql+pymysql://{mysql_user}:{mysql_password}@{mysql_host}:3307/{mysql_db}'
|
||||
f'mysql+pymysql://{mysql_user}:{mysql_password}@{mysql_host}:3306/{mysql_db}'
|
||||
)
|
||||
else:
|
||||
sqlite_db_path = os.getenv('SQLITE_DB_PATH', 'machines.db')
|
||||
|
||||
Reference in New Issue
Block a user