-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathrender.yaml
More file actions
295 lines (265 loc) · 8.24 KB
/
render.yaml
File metadata and controls
295 lines (265 loc) · 8.24 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
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
# =============================================================================
# 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 (Paystack, 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
- key: DEV_MODE
value: "false"
- key: BACKEND_URL
sync: false
- key: FRONTEND_URL
sync: false
- key: FRONTEND_DOMAIN
sync: false
- key: CORS_ORIGINS
sync: false
- key: SSL_VERIFY
value: "true"
- key: AUTH_REQUEST_TIMEOUT
value: "15"
# 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_CLIENT_ID
sync: false
- key: GITHUB_CLIENT_SECRET
sync: false
- key: GITHUB_USERNAME
sync: false
- key: GITHUB_TOKEN
sync: false
# Clerk Authentication
- key: CLERK_ISSUER
sync: false
- key: CLERK_SECRET_KEY
sync: false
- key: CLERK_WEBHOOK_SECRET
sync: false
# AI Providers
- key: GROQ_API_KEY
sync: false
- key: OPENAI_API_KEY
sync: false
- key: ANTHROPIC_API_KEY
sync: false
- key: MISTRAL_API_KEY
sync: false
# Paystack Payments
- key: PAYSTACK_SECRET_KEY
sync: false
- key: PAYSTACK_PUBLIC_KEY
sync: false
- key: PAYSTACK_WEBHOOK_SECRET
sync: false
- key: PAYSTACK_PLAN_PRO_MONTHLY
sync: false
- key: PAYSTACK_PLAN_PRO_YEARLY
sync: false
- key: PAYSTACK_SUCCESS_URL
sync: false
- key: PAYSTACK_CANCEL_URL
sync: false
- key: PAYSTACK_MANAGE_SUBSCRIPTION_URL
sync: false
# Images / Media
- key: UNSPLASH_ACCESS_KEY
sync: false
# Email (Optional)
- key: SMTP_SERVER
sync: false
- key: SMTP_PORT
sync: false
- key: SMTP_USERNAME
sync: false
- key: SMTP_PASSWORD
sync: false
- key: FROM_EMAIL
sync: false
- key: ADMIN_EMAIL
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:
- key: ENVIRONMENT
value: production
# 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
- key: MISTRAL_API_KEY
sync: false
# Network / OAuth
- key: SSL_VERIFY
value: "true"
- key: AUTH_REQUEST_TIMEOUT
value: "15"
# 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:
- key: ENVIRONMENT
value: production
# 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 (public key)
- key: NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY
sync: false
- key: CLERK_SECRET_KEY
sync: false
# OAuth Redirect URI
- key: NEXT_PUBLIC_REDIRECT_URI
sync: false
# Site URL (used for SEO/canonical URLs)
- key: NEXT_PUBLIC_SITE_URL
sync: false
# Paystack (for client-side checkout, if used)
- key: NEXT_PUBLIC_PAYSTACK_PUBLIC_KEY
sync: false
- key: NEXT_PUBLIC_PAYSTACK_MONTHLY_CHECKOUT_URL
sync: false
- key: NEXT_PUBLIC_PAYSTACK_YEARLY_CHECKOUT_URL
sync: false