26 lines
699 B
Diff
26 lines
699 B
Diff
diff --git a/mealie/core/config.py b/mealie/core/config.py
|
|
index 7dae9b23..71769098 100644
|
|
--- a/mealie/core/config.py
|
|
+++ b/mealie/core/config.py
|
|
@@ -19,15 +19,15 @@ DATA_DIR = os.getenv("DATA_DIR")
|
|
|
|
|
|
def determine_data_dir() -> Path:
|
|
- global PRODUCTION, TESTING, BASE_DIR, DATA_DIR
|
|
+ global TESTING
|
|
|
|
if TESTING:
|
|
return BASE_DIR.joinpath(DATA_DIR if DATA_DIR else "tests/.temp")
|
|
|
|
- if PRODUCTION:
|
|
- return Path(DATA_DIR if DATA_DIR else "/app/data")
|
|
-
|
|
- return BASE_DIR.joinpath("dev", "data")
|
|
+ state_dir = os.getenv("STATE_DIRECTORY")
|
|
+ if not state_dir:
|
|
+ raise Exception("State directory not set")
|
|
+ return Path(state_dir)
|
|
|
|
|
|
@lru_cache
|