Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 0 additions & 17 deletions client/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 6 additions & 3 deletions server/alembic/env.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,11 +80,14 @@ def run_migrations_online() -> None:
# Get the absolute path to the CA certificate
cert_path = os.path.join(os.path.dirname(__file__), '..', 'certs', 'DigiCertGlobalRootCA.crt.pem')

connect_args = {}

if os.getenv("MYSQL_SSL", "false").lower() == "true":
connect_args["ssl_ca"] = cert_path

connectable = create_engine(
url,
connect_args={
'ssl_ca': cert_path # Path to CA certificate
}
connect_args=connect_args
)

with connectable.connect() as connection:
Expand Down
Binary file modified server/prediction_models/model_cardio_h.joblib
Binary file not shown.
Binary file modified server/prediction_models/model_diabetes_h.joblib
Binary file not shown.
Binary file modified server/prediction_models/model_stroke_h.joblib
Binary file not shown.
12 changes: 8 additions & 4 deletions server/utils/database.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,16 @@
# Get the absolute path to the CA certificate
cert_path = os.path.join(os.path.dirname(__file__), '..', 'certs', 'DigiCertGlobalRootCA.crt.pem')

# Create the database connection manager with SSL enabled (for Azure MySQL)

connect_args = {}

# Only enable SSL if explicitly requested
if os.getenv("MYSQL_SSL", "false").lower() == "true":
connect_args["ssl_ca"] = cert_path

engine = create_engine(
DATABASE_URL,
connect_args={
'ssl_ca': cert_path # Path to CA certificate
}
connect_args=connect_args
)
session_local = sessionmaker(autocommit=False, bind=engine)

Expand Down
Loading