middha commited on
Commit
ddb75e8
Β·
verified Β·
1 Parent(s): 1bdd907

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +11 -1
app.py CHANGED
@@ -34,7 +34,17 @@ if not OPENAI_API_KEY:
34
  app.logger.warning("OPENAI_API_KEY is not set in the environment")
35
 
36
  # ─── 5) Database config ───────────────────────────────────────────────────────
37
- app.config["SQLALCHEMY_DATABASE_URI"] = "sqlite:///jobs.db"
 
 
 
 
 
 
 
 
 
 
38
  app.config["SQLALCHEMY_TRACK_MODIFICATIONS"] = False
39
  app.secret_key = os.getenv("SECRET_KEY", "your_secret_key_here")
40
 
 
34
  app.logger.warning("OPENAI_API_KEY is not set in the environment")
35
 
36
  # ─── 5) Database config ───────────────────────────────────────────────────────
37
+ app = Flask(
38
+ __name__,
39
+ instance_path="/mnt/data",
40
+ instance_relative_config=True
41
+ )
42
+
43
+ # 2) ensure it actually exists (should, but no harm)
44
+ os.makedirs(app.instance_path, exist_ok=True)
45
+
46
+ # 3) configure your DB to live there as well
47
+ app.config["SQLALCHEMY_DATABASE_URI"] = "sqlite:////mnt/data/jobs.db"
48
  app.config["SQLALCHEMY_TRACK_MODIFICATIONS"] = False
49
  app.secret_key = os.getenv("SECRET_KEY", "your_secret_key_here")
50