Dockerize: self-contained stack + B2 backup sidecar
This commit is contained in:
4
app.py
4
app.py
@@ -45,7 +45,7 @@ def money_filter(value):
|
||||
except (TypeError, ValueError):
|
||||
return "0.00"
|
||||
|
||||
TAX_FILE = os.path.join(os.path.dirname(__file__), "data", "taxes.json")
|
||||
TAX_FILE = os.path.join(os.environ.get("DATA_DIR", os.path.join(os.path.dirname(__file__), "data")), "taxes.json")
|
||||
|
||||
def load_taxes():
|
||||
if os.path.exists(TAX_FILE):
|
||||
@@ -160,7 +160,7 @@ def inject_unreviewed_count():
|
||||
count = sum(1 for t in transactions if not t.get("reviewed"))
|
||||
return dict(unreviewed_count=count)
|
||||
|
||||
DATA_DIR = os.path.join(os.path.dirname(__file__), "data")
|
||||
DATA_DIR = os.environ.get("DATA_DIR", os.path.join(os.path.dirname(__file__), "data"))
|
||||
TRANSACTIONS_FILE = os.path.join(DATA_DIR, "transactions.json")
|
||||
RULES_FILE = os.path.join(DATA_DIR, "rules.json")
|
||||
BUDGET_FILE = os.path.join(DATA_DIR, "budget.json")
|
||||
|
||||
Reference in New Issue
Block a user