From 87517afdcd84c65f07a6f2353e98a32e2e4eee85 Mon Sep 17 00:00:00 2001 From: Matthew Evans Date: Mon, 19 Aug 2024 19:44:25 +0100 Subject: [PATCH] Reinstate dotenv loading for non-config options --- pydatalab/pydatalab/main.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pydatalab/pydatalab/main.py b/pydatalab/pydatalab/main.py index c4c43989a..cde58fcc8 100644 --- a/pydatalab/pydatalab/main.py +++ b/pydatalab/pydatalab/main.py @@ -3,6 +3,7 @@ import pathlib from typing import Any, Dict +from dotenv import dotenv_values from flask import Flask, redirect, request, url_for from flask_compress import Compress from flask_cors import CORS @@ -145,6 +146,8 @@ def create_app( for key in mail_settings: app.config[key] = mail_settings[key] + app.config.update(dotenv_values(dotenv_path=env_file)) + LOGGER.info("Starting app with Flask app.config: %s", app.config) _check_feature_flags(app)