File size: 1,074 Bytes
255cbd1 | 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 | services:
# βββ BACKEND API (FastAPI) βββ
- type: web
name: digi-biz-api
runtime: python
buildCommand: pip install -r requirements.txt
startCommand: uvicorn backend.api.main:app --host 0.0.0.0 --port $PORT
envVars:
- key: GROQ_API_KEY
sync: false
- key: PYTHON_VERSION
value: "3.11.7"
# This will automatically be passed the frontend's URL once deployed
- key: FRONTEND_URL
fromService:
type: web
name: digi-biz-frontend
envVarKey: RENDER_EXTERNAL_URL
# βββ FRONTEND (Next.js) βββ
- type: web
name: digi-biz-frontend
runtime: node
buildCommand: cd frontend && npm install && npm run build
startCommand: cd frontend && npm start
envVars:
# Automatically wire the frontend to point to the backend API we just created
- key: NEXT_PUBLIC_API_URL
fromService:
type: web
name: digi-biz-api
envVarKey: RENDER_EXTERNAL_URL
# We append /api to the URL
property: url
|