feat: allow configure database url via env

This commit is contained in:
2025-11-24 17:13:40 +01:00
parent 7b5f28651b
commit dd7a81fd0f

View File

@@ -29,7 +29,7 @@ import smarttools
app = flask.Flask("Icinga Report In Gateway") app = flask.Flask("Icinga Report In Gateway")
app.config['SQLALCHEMY_DATABASE_URI'] = 'sqlite:///database.sqlite' app.config['SQLALCHEMY_DATABASE_URI'] = os.environ.get('SQLALCHEMY_DATABASE_URI') or 'sqlite:///database.sqlite'
app.config['JSON_CONFIG_FILE'] = 'services.json' app.config['JSON_CONFIG_FILE'] = 'services.json'
app.config['JSON_CONFIG_DIR'] = 'config' app.config['JSON_CONFIG_DIR'] = 'config'
db = SQLAlchemy(app) db = SQLAlchemy(app)