added Docker setup & moved database into instance folder

This commit is contained in:
2025-08-27 21:28:02 +02:00
parent 36f7f6d278
commit 1291970b51
9 changed files with 49 additions and 1979 deletions

View File

@@ -33,7 +33,7 @@ def get_db() -> TinyDB:
Stored in `g` to avoid reopening the file multiple times.
"""
if "orders_db" not in g:
db_path = os.path.join(current_app.root_path, "data", FILE_NAME)
db_path = os.path.join(current_app.instance_path, FILE_NAME)
if PRODUCTION == "dev":
g.orders_db = TinyDB(db_path, storage=PrettyJSONStorage )
else: