-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathrender.yaml
More file actions
231 lines (206 loc) · 6.67 KB
/
render.yaml
File metadata and controls
231 lines (206 loc) · 6.67 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
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
# =============================================================================
# Render Blueprint - PostBot SaaS Production Deployment
# =============================================================================
#
# Architecture:
# - PostgreSQL Database (managed)
# - Redis Cache & Message Broker (managed)
# - Backend API (FastAPI + Gunicorn)
# - Celery Worker (background tasks)
# - Celery Beat (scheduled task scheduler)
# - Frontend (Next.js Standalone)
#
# Deploy with: https://render.com/deploy
#
# IMPORTANT: After deployment, manually set secrets in Render Dashboard:
# - All API keys (Stripe, OpenAI, Anthropic, Groq, LinkedIn, Clerk)
# - Database URLs are auto-populated by Render
# =============================================================================
# =============================================================================
# DATABASES
# =============================================================================
databases:
- name: postbot-db
databaseName: postbot
user: postbot
plan: free # Upgrade to starter/standard for production
region: oregon
# =============================================================================
# SERVICES
# =============================================================================
services:
# ---------------------------------------------------------------------------
# Redis - Message Broker & Cache
# ---------------------------------------------------------------------------
- type: redis
name: postbot-redis
plan: free # Upgrade to starter for production
region: oregon
maxmemoryPolicy: allkeys-lru
ipAllowList: [] # Allow all IPs (internal only)
# ---------------------------------------------------------------------------
# Backend API Service (FastAPI)
# ---------------------------------------------------------------------------
- type: web
name: postbot-api
runtime: docker
region: oregon
plan: free # Upgrade to starter for production
dockerfilePath: ./backend/Dockerfile
dockerContext: .
healthCheckPath: /health
envVars:
# Python Configuration
- key: PYTHON_VERSION
value: "3.11"
- key: ENVIRONMENT
value: production
# Database (auto-populated by Render)
- key: DATABASE_URL
fromDatabase:
name: postbot-db
property: connectionString
# Redis (auto-populated by Render)
- key: REDIS_URL
fromService:
name: postbot-redis
type: redis
property: connectionString
# LinkedIn OAuth
- key: LINKEDIN_CLIENT_ID
sync: false
- key: LINKEDIN_CLIENT_SECRET
sync: false
# GitHub Integration
- key: GITHUB_USERNAME
sync: false
# Clerk Authentication
- key: CLERK_ISSUER
sync: false
- key: CLERK_SECRET_KEY
sync: false
# AI Providers
- key: GROQ_API_KEY
sync: false
- key: OPENAI_API_KEY
sync: false
- key: ANTHROPIC_API_KEY
sync: false
# Stripe Payments
- key: STRIPE_SECRET_KEY
sync: false
- key: STRIPE_WEBHOOK_SECRET
sync: false
- key: STRIPE_PRICE_ID_PRO
sync: false
# Email (Optional)
- key: SMTP_HOST
sync: false
- key: SMTP_PORT
sync: false
- key: SMTP_USER
sync: false
- key: SMTP_PASSWORD
sync: false
# Security
- key: SECRET_KEY
generateValue: true
- key: ENCRYPTION_KEY
generateValue: true
# ---------------------------------------------------------------------------
# Celery Worker (Background Tasks)
# ---------------------------------------------------------------------------
- type: worker
name: postbot-worker
runtime: docker
region: oregon
plan: free # Upgrade to starter for production
dockerfilePath: ./backend/Dockerfile
dockerContext: .
# Override the CMD to run Celery worker
dockerCommand: celery -A services.celery_app worker --loglevel=info --concurrency=2
envVars:
# Database
- key: DATABASE_URL
fromDatabase:
name: postbot-db
property: connectionString
# Redis
- key: REDIS_URL
fromService:
name: postbot-redis
type: redis
property: connectionString
# LinkedIn OAuth (for posting)
- key: LINKEDIN_CLIENT_ID
sync: false
- key: LINKEDIN_CLIENT_SECRET
sync: false
# GitHub Integration
- key: GITHUB_USERNAME
sync: false
# AI Providers (for post generation)
- key: GROQ_API_KEY
sync: false
- key: OPENAI_API_KEY
sync: false
- key: ANTHROPIC_API_KEY
sync: false
# Security
- key: SECRET_KEY
sync: false
- key: ENCRYPTION_KEY
sync: false
# ---------------------------------------------------------------------------
# Celery Beat (Task Scheduler)
# ---------------------------------------------------------------------------
- type: worker
name: postbot-beat
runtime: docker
region: oregon
plan: free # Upgrade to starter for production
dockerfilePath: ./backend/Dockerfile
dockerContext: .
# Override the CMD to run Celery beat scheduler
dockerCommand: celery -A services.celery_app beat --loglevel=info
envVars:
# Database (for reading scheduled tasks)
- key: DATABASE_URL
fromDatabase:
name: postbot-db
property: connectionString
# Redis (for task queue)
- key: REDIS_URL
fromService:
name: postbot-redis
type: redis
property: connectionString
# ---------------------------------------------------------------------------
# Frontend (Next.js Standalone)
# ---------------------------------------------------------------------------
- type: web
name: postbot-web
runtime: docker
region: oregon
plan: free # Upgrade to starter for production
dockerfilePath: ./web/Dockerfile
dockerContext: ./web
healthCheckPath: /
envVars:
# Node Configuration
- key: NODE_ENV
value: production
# API URL (set after backend deploys)
- key: NEXT_PUBLIC_API_URL
sync: false
# Clerk Authentication
- key: NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY
sync: false
- key: CLERK_SECRET_KEY
sync: false
# OAuth Redirect URI
- key: NEXT_PUBLIC_REDIRECT_URI
sync: false
# Stripe (for client-side checkout)
- key: NEXT_PUBLIC_STRIPE_PUBLISHABLE_KEY
sync: false