MTayyaBH commited on
Commit
1fb1f42
Β·
1 Parent(s): 3de52b9

Remove obsolete Python placeholder app

Browse files
Files changed (2) hide show
  1. .env +81 -0
  2. app.py +0 -50
.env ADDED
@@ -0,0 +1,81 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # ─── Core Database (PostgreSQL) ───────────────────────────────────────────────
2
+
3
+ DB_HOST=208.109.188.83
4
+ DB_PORT=5432
5
+ DB_USERNAME=postgres
6
+ DB_PASSWORD=fazi@123jJ
7
+ DB_DATABASE=chatbolt
8
+
9
+
10
+
11
+ # ─── JWT ──────────────────────────────────────────────────────────────────────
12
+ JWT_SECRET=1456185d-7228-434e-9650-e5b340bf7042
13
+ JWT_EXPIRES_IN=7d
14
+
15
+ # ─── Encryption (for DB connection strings stored in DB) ──────────────────────
16
+ ENCRYPTION_KEY=6c3a9d76-75f1-4144-ae63-db00cb983f1d
17
+
18
+ # ─── Groq AI ──────────────────────────────────────────────────────────────────
19
+ GROQ_API_KEY=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
20
+
21
+
22
+ USE_LANGGRAPH=true
23
+
24
+ # ─── Debug Mode ───────────────────────────────────────────────────────────────
25
+ # Set to "true" to enable `debugger;` pause points across all services.
26
+ # Keep "false" in dev/prod unless actively stepping through code.
27
+ DEBUG_MODE=true
28
+
29
+ # ─── Hooks SQL Cache ──────────────────────────────────────────────────────────
30
+ # In-memory cache for pre-hook SELECT results (keyed per hook + company_id).
31
+ # HOOKS_CACHE_ENABLED=true|false (default: true)
32
+ # HOOKS_CACHE_TTL_SECONDS=<seconds> (default: 30)
33
+ HOOKS_CACHE_ENABLED=true
34
+ HOOKS_CACHE_TTL_SECONDS=30
35
+
36
+ # ─── Logging ──────────────────────────────────────────────────────────────────
37
+ # LOGS_ENABLED=true|false (default: true)
38
+ # Master switch β€” set "false" to silence all non-error output.
39
+ # LOG_LEVEL=error|warn|log|debug|verbose (default: log)
40
+ # Fine-grained threshold. Errors are ALWAYS logged.
41
+ LOGS_ENABLED=true
42
+ LOG_LEVEL=log
43
+
44
+ # ─── LLM Timeout ──────────────────────────────────────────────────────────────
45
+ # Hard timeout for every LLM provider call. Prevents hanging requests from
46
+ # blocking the user indefinitely. Triggers the "network error" friendly reply.
47
+ # LLM_TIMEOUT_SECONDS=<seconds> (default: 25)
48
+ LLM_TIMEOUT_SECONDS=20
49
+
50
+ # ─── LLM Fallback (auto-retry on transient failures) ──────────────────────────
51
+ # When the agent's primary provider fails with credit/network/rate-limit errors,
52
+ # we automatically retry the SAME call on this fallback provider.
53
+ # Leave blank to disable fallback.
54
+ # LLM_FALLBACK_PROVIDER=groq|openai|anthropic|together|deepseek
55
+ # LLM_FALLBACK_MODEL=<model id accepted by the fallback provider>
56
+ # LLM_FALLBACK_API_KEY=<optional β€” falls back to the per-provider env key>
57
+ LLM_FALLBACK_PROVIDER=groq
58
+ LLM_FALLBACK_MODEL=llama-3.3-70b-versatile
59
+ LLM_FALLBACK_API_KEY=
60
+
61
+
62
+ # ─── Microservice Ports (TCP) ─────────────────────────────────────────────────
63
+ API_GATEWAY_PORT=3000
64
+ AGENT_SERVICE_PORT=3001
65
+ DB_CONNECTOR_PORT=3002
66
+ KNOWLEDGE_SERVICE_PORT=3003
67
+
68
+ # ─── Microservice Hosts ───────────────────────────────────────────────────────
69
+ AGENT_SERVICE_HOST=localhost
70
+ DB_CONNECTOR_HOST=localhost
71
+ KNOWLEDGE_SERVICE_HOST=localhost
72
+
73
+ # ─── Stripe ───────────────────────────────────────────────────────────────────
74
+ STRIPE_SECRET_KEY=sk_test_51TANb5EoPxw8ewEkWnqnJsgDeg4w2eq2MNTaP57OBkkpeENvnNUrXODTIV8kulWFP5otgI5fqWPNkg63EKjl5Gkz004fb22JhJ
75
+ STRIPE_WEBHOOK_SECRET=
76
+
77
+ # ─── CORS ─────────────────────────────────────────────────────────────────────
78
+ CORS_ORIGIN=*
79
+
80
+ # ─── Frontend URL (Stripe redirects) ──────────────────────────────────────────
81
+ FRONTEND_URL=*
app.py DELETED
@@ -1,50 +0,0 @@
1
- import os
2
- from http.server import BaseHTTPRequestHandler, HTTPServer
3
-
4
-
5
- class Handler(BaseHTTPRequestHandler):
6
- def do_GET(self):
7
- if self.path == "/health":
8
- self.send_response(200)
9
- self.send_header("Content-Type", "text/plain; charset=utf-8")
10
- self.end_headers()
11
- self.wfile.write(b"ok")
12
- return
13
-
14
- self.send_response(200)
15
- self.send_header("Content-Type", "text/html; charset=utf-8")
16
- self.end_headers()
17
- self.wfile.write(
18
- b"""<!doctype html>
19
- <html>
20
- <head>
21
- <meta charset="utf-8" />
22
- <meta name="viewport" content="width=device-width, initial-scale=1" />
23
- <title>Chatbolt Dev</title>
24
- <style>
25
- body { font-family: Arial, sans-serif; padding: 2rem; background: #f5f7fb; color: #1e293b; }
26
- .card { max-width: 720px; margin: 0 auto; background: #fff; border-radius: 12px; padding: 1.5rem; box-shadow: 0 4px 18px rgba(15,23,42,0.08); }
27
- h1 { margin-top: 0; }
28
- code { background: #eef2ff; padding: 0.15rem 0.35rem; border-radius: 6px; }
29
- </style>
30
- </head>
31
- <body>
32
- <div class="card">
33
- <h1>Chatbolt Dev Space is running</h1>
34
- <p>Docker deployment completed successfully.</p>
35
- <p>Health check endpoint: <code>/health</code></p>
36
- </div>
37
- </body>
38
- </html>"""
39
- )
40
-
41
-
42
- def main():
43
- port = int(os.getenv("PORT", "7860"))
44
- server = HTTPServer(("0.0.0.0", port), Handler)
45
- print(f"Server listening on 0.0.0.0:{port}")
46
- server.serve_forever()
47
-
48
-
49
- if __name__ == "__main__":
50
- main()