added Docker setup & moved database into instance folder
This commit is contained in:
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user