-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrender.yaml
More file actions
78 lines (75 loc) · 3.04 KB
/
render.yaml
File metadata and controls
78 lines (75 loc) · 3.04 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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
# # Define environment groups at the top level
# envVarGroups:
# - name: lucknow-guide-secrets # The name of the group you create in Render UI
# # Define the expected keys AND add placeholder values for the YAML validator
# envVars:
# - key: GROQ_API_KEY
# value: "" # Placeholder value
# - key: HUGGINGFACEHUB_API_TOKEN
# value: "" # Placeholder value
# services:
# # Backend Service (FastAPI)
# - type: web
# name: lucknow-guide-backend # Unique name for the backend service
# env: python
# plan: free # Use Render's free tier
# runtime: docker
# dockerfilePath: ./backend/Dockerfile # Path relative to repo root
# dockerContext: ./backend # Build context directory
# # Render implicitly links the secrets based on the group name match
# # You can still define non-secret env vars directly
# envVars:
# - key: PYTHON_VERSION
# value: 3.11 # Match the Python version in your Dockerfile
# # Optional: Health check path for FastAPI
# healthCheckPath: /docs
# autoDeploy: yes # Redeploy automatically on pushes to the main branch
# # Frontend Service (Streamlit)
# - type: web
# name: lucknow-guide-frontend # Unique name for the frontend service
# env: python
# plan: free
# runtime: docker
# dockerfilePath: ./frontend/Dockerfile # Path relative to repo root
# dockerContext: ./frontend
# envVars:
# - key: PYTHON_VERSION
# value: 3.11
# # CRUCIAL: Tell the frontend the internal URL of the backend service on Render
# - key: BACKEND_URL
# # Render automatically resolves 'lucknow-guide-backend' to the internal service address
# value: http://lucknow-guide-backend:8000/query
# autoDeploy: yes
services:
# Backend Service (FastAPI)
- type: web
name: lucknow-guide-backend # Unique name for the backend service
env: python
plan: free # Use Render's free tier
runtime: docker
dockerfilePath: ./backend/Dockerfile # Path relative to repo root
dockerContext: ./backend # Build context directory
envVars:
- key: PYTHON_VERSION
value: 3.11 # Match the Python version in your Dockerfile
# THIS IS THE CORRECT, PERMANENT LINK:
- fromGroup: lucknow-guide-secrets # This links the group you created in the UI
# Optional: Health check path for FastAPI
healthCheckPath: /docs
autoDeploy: no # Redeploy automatically on pushes to the main branch
# Frontend Service (Streamlit)
- type: web
name: lucknow-guide-frontend # Unique name for the frontend service
env: python
plan: free
runtime: docker
dockerfilePath: ./frontend/Dockerfile # Path relative to repo root
dockerContext: ./frontend
envVars:
- key: PYTHON_VERSION
value: 3.11
# CRUCIAL: Tell the frontend the internal URL of the backend service on Render
- key: BACKEND_URL
# Render automatically resolves 'lucknow-guide-backend' to the internal service address
value: https://lucknow-guide-backend.onrender.com/query
autoDeploy: yes