diff --git a/CHANGELOG.md b/CHANGELOG.md index d6a319f..99565bc 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,12 @@ All notable changes to ExaFS will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [1.1.7] - 2025-10-16 + +### Fixed +- Fixed config loading to use Flask instance folder +- Resolves path issues when package is installed via pip + ## [1.1.6] - 2025-10-08 ### Fixed @@ -268,4 +274,5 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 [0.5.0]: https://github.com/CESNET/exafs/compare/v0.4.8...v0.5.0 [0.4.8]: https://github.com/CESNET/exafs/compare/v0.4.7...v0.4.8 [0.4.7]: https://github.com/CESNET/exafs/compare/v0.4.6...v0.4.7 -[0.4.6]: https://github.com/CESNET/exafs/releases/tag/v0.4.6 \ No newline at end of file +[0.4.6]: https://github.com/CESNET/exafs/releases/tag/v0.4.6 + diff --git a/flowapp/__about__.py b/flowapp/__about__.py index 35407e8..b12417c 100755 --- a/flowapp/__about__.py +++ b/flowapp/__about__.py @@ -1,4 +1,4 @@ -__version__ = "1.1.6" +__version__ = "1.1.7" __title__ = "ExaFS" __description__ = "Tool for creation, validation, and execution of ExaBGP messages." __author__ = "CESNET / Jiri Vrany, Petr Adamec, Josef Verich, Jakub Man" diff --git a/flowapp/__init__.py b/flowapp/__init__.py index 9b9616a..d1ea49d 100644 --- a/flowapp/__init__.py +++ b/flowapp/__init__.py @@ -1,4 +1,5 @@ # -*- coding: utf-8 -*- +import os from flask import Flask, redirect, render_template, session, url_for from flask_sso import SSO @@ -23,7 +24,8 @@ def create_app(config_object=None): - app = Flask(__name__) + # Enable instance_relative_config to use /app/instance folder + app = Flask(__name__, instance_relative_config=True) # Load the default configuration for dashboard and main menu app.config.from_object(InstanceConfig) @@ -31,9 +33,11 @@ def create_app(config_object=None): app.config.from_object(config_object) # Allow override of instance config from external file + # This now looks in /app/instance/config_override.py instead of ../instance_config_override.py try: - app.config.from_pyfile("../instance_config_override.py", silent=False) - except FileNotFoundError: + app.config.from_pyfile("config_override.py", silent=False) + except FileNotFoundError as e: + print(f"Instance config override file not found: {e.filename}, using defaults.") pass # No override file, use defaults app.config.setdefault("VERSION", __version__)