-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrender.yaml
More file actions
81 lines (76 loc) · 2.86 KB
/
render.yaml
File metadata and controls
81 lines (76 loc) · 2.86 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
# Render Blueprint for AlephAuto Backend
# https://render.com/docs/blueprint-spec
#
# DEPLOYMENT REQUIREMENTS:
# - Node.js 25.x (pinned via NODE_VERSION env var)
# - Doppler CLI (for secrets management)
# - pnpm (for Node.js dependencies)
# - Redis/Valkey (for scan result caching)
# - Managed PostgreSQL (for job persistence)
#
# ARCHITECTURE:
# Single web service runs both the API server and pipeline cron scheduler.
# Render does not support shared disks between services, so both must run
# in the same process to share the PostgreSQL database.
services:
# Redis/Valkey Key-Value Store for caching scan results
# https://docs.render.com/redis
- type: redis
name: alephauto-redis
region: oregon
plan: free
ipAllowList: [] # Allow connections from all Render services
maxmemoryPolicy: allkeys-lru # Evict least recently used keys when memory full
# API + Dashboard + Pipeline Cron
- type: web
name: alephauto
runtime: node
region: oregon
plan: starter
buildCommand: |
# Install Doppler CLI
curl -sLf --retry 3 --tlsv1.2 --proto "=https" 'https://packages.doppler.com/public/cli/gpg.DE2A7741.key' | gpg --dearmor -o /usr/share/keyrings/doppler-archive-keyring.gpg
echo "deb [signed-by=/usr/share/keyrings/doppler-archive-keyring.gpg] https://packages.doppler.com/public/cli/deb/debian any-version main" | tee /etc/apt/sources.list.d/doppler-cli.list
apt-get update && apt-get install -y doppler
# Install Node.js dependencies and build frontend
pnpm install
npm run build:frontend
echo "Build complete"
# ENABLE_CRON_SCHEDULER causes the API server to also start pipeline cron jobs
startCommand: doppler run -c prd -- node --strip-types api/server.ts
healthCheckPath: /health
envVars:
- key: NODE_VERSION
value: "25.6.0"
- key: NODE_ENV
value: production
# PostgreSQL connection for job persistence (injected by Doppler at runtime)
# Enable in-process cron scheduler for pipeline jobs
- key: ENABLE_CRON_SCHEDULER
value: "true"
# Disable job execution on Render to prevent CI/CD interference
# Set to "false" in Doppler if you need Render to run jobs
- key: DISABLE_JOB_EXECUTION
value: "true"
# Doppler service token for production config
- key: DOPPLER_TOKEN
sync: false
# CORS configuration
- key: CORS_ORIGIN
value: https://n0ai.app
# Redis connection for scan result caching
- key: REDIS_URL
fromService:
type: redis
name: alephauto-redis
property: connectionString
autoDeploy: true
branch: main
databases:
# Managed PostgreSQL for job persistence (pre-existing, free plan)
# https://docs.render.com/databases
- name: jobs-db
region: oregon
plan: free
databaseName: jobs_aji7
user: jobs_aji7_user