-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrender.yaml
More file actions
43 lines (41 loc) · 2.01 KB
/
Copy pathrender.yaml
File metadata and controls
43 lines (41 loc) · 2.01 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
services:
# Backend API (Free tier - 750 hours/month, spins down after 15 min idle)
- type: web
name: besser-example-lib-backend-034945
runtime: python
plan: free
buildCommand: pip install -r backend/requirements.txt
startCommand: cd backend && uvicorn main_api:app --host 0.0.0.0 --port $PORT
envVars:
- key: PYTHON_VERSION
value: 3.11.9
# Frontend (Free static site)
- type: web
name: besser-example-lib-frontend-034945
runtime: static
buildCommand: cd frontend && npm install && npm run build
staticPublishPath: frontend/build
envVars:
- key: VITE_API_URL
value: https://besser-example-lib-backend-034945.onrender.com
headers:
- path: /assets/*.js
name: Content-Type
value: application/javascript
- path: /assets/*.css
name: Content-Type
value: text/css
routes:
- type: rewrite
source: /*
destination: /index.html
# Agent Service: Library_Agent (Free tier - WebSocket-based AI agent)
- type: web
name: besser-52a31eda14b2
runtime: python
plan: free
buildCommand: pip install torch==2.6.0+cpu scikit-learn==1.6.1 besser-agentic-framework[llms]==4.3.2 --extra-index-url https://download.pytorch.org/whl/cpu && python -c "import nltk; nltk.download('punkt', quiet=True); nltk.download('punkt_tab', quiet=True)"
startCommand: cd agents/library_agent && python -c "import yaml, os, re, pathlib; c = yaml.safe_load(open('config.yaml')); c['platforms']['websocket']['host'] = '0.0.0.0'; c['platforms']['websocket']['port'] = int(os.environ['PORT']); c['db']['monitoring']['enabled'] = False; c['db']['streamlit']['enabled'] = False; c['nlp']['openai']['api_key'] = os.environ.get('OPENAI_API_KEY') or c['nlp']['openai'].get('api_key', ''); yaml.safe_dump(c, open('config.yaml','w')); p = pathlib.Path('Library_Agent.py'); p.write_text(re.sub(r'use_ui=True', 'use_ui=False', p.read_text()))" && python -u Library_Agent.py
envVars:
- key: PYTHON_VERSION
value: 3.11.9