-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrender.yaml
More file actions
52 lines (48 loc) · 1.84 KB
/
Copy pathrender.yaml
File metadata and controls
52 lines (48 loc) · 1.84 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
# Render.com deployment configuration
# This file makes it easy to deploy both services on Render
#
# REQUIRED: After first deploy, set these in the Render dashboard to fix "Failed to fetch":
# persona-builder-frontend → VITE_API_URL = https://persona-builder-backend.onrender.com/api
# persona-builder-backend → CORS_ORIGIN = https://persona-builder-frontend.onrender.com
# Then redeploy the frontend so the new API URL is baked into the build.
services:
# Backend API Service
- type: web
name: persona-builder-backend
env: node
rootDir: backend
plan: free # Change to 'starter' or 'standard' for production
buildCommand: npm install && npm run build
startCommand: npm start
envVars:
- key: NODE_ENV
value: production
- key: PORT
value: 3001
- key: JWT_SECRET
generateValue: true # Render will generate a secure secret
- key: JWT_EXPIRES_IN
value: 7d
- key: CORS_ORIGIN
sync: false # REQUIRED: set to your frontend URL, e.g. https://persona-builder-frontend.onrender.com
- key: GEMINI_API_KEY
sync: false # Set this manually with your API key
# Link to PostgreSQL database
# database: persona-builder-db # Uncomment and create database first
# Frontend Static Site
- type: web
name: persona-builder-frontend
env: static
buildCommand: npm install && npm run build
staticPublishPath: dist
envVars:
- key: VITE_API_URL
sync: false # REQUIRED: set to backend API URL, e.g. https://persona-builder-backend.onrender.com/api
- key: VITE_GEMINI_API_KEY
sync: false # Set this manually with your API key
databases:
# PostgreSQL Database
- name: persona-builder-db
plan: free # Change to 'starter' or 'standard' for production
databaseName: persona_builder
user: persona_builder_user