Repository navigation
Expand file tree
/
Copy pathrender.yaml
More file actions
105 lines (103 loc) · 3.66 KB
/
Copy pathrender.yaml
File metadata and controls
105 lines (103 loc) · 3.66 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
services:
- type: web
name: codehub
runtime: node
rootDir: backend
buildCommand: npm install
startCommand: node server.js
envVars:
- key: NODE_VERSION
value: 20.11.0
- key: FRONTEND_URL
sync: false
- key: MONGODB_URI
sync: false
- key: ADMIN_KEY
sync: false
- key: SUPABASE_URL
sync: false
- key: SUPABASE_KEY
sync: false
- key: GROQ_API_KEY
sync: false
- key: GEMINI_API_KEY
sync: false
- key: OPENROUTER_API_KEY
sync: false
- key: MISTRAL_API_KEY
sync: false
- key: COHERE_API_KEY
sync: false
- key: TOGETHER_API_KEY
sync: false
- key: REDIS_URL
sync: false
- key: RENDER_EXTERNAL_URL
sync: false
# ── Notificaciones en tiempo real (web + Android) ──────────
# Sin estas 4, el sistema de push sigue "andando" pero con
# huecos: usa la clave VAPID de ejemplo (insegura) y/o el
# push nativo Android (FCM) queda deshabilitado.
- key: VAPID_PUBLIC_KEY
sync: false
- key: VAPID_PRIVATE_KEY
sync: false
# JSON completo de la cuenta de servicio de Firebase (una sola
# línea). Sin esto, la APK Android NO recibe push del servidor.
- key: FIREBASE_SERVICE_ACCOUNT
sync: false
# Mismo valor que el "Secret" configurado en GitHub → Settings →
# Webhooks, para que las notificaciones de nuevas versiones
# lleguen al instante en vez de esperar el polling cada 6h.
- key: GITHUB_WEBHOOK_SECRET
sync: false
# URL publica del backend (usada por el bot para registrarse a si mismo)
- key: BACKEND_URL
value: https://codehub-98s6.onrender.com
# ── Bot de administración por Telegram ─────────────────────
# TELEGRAM_BOT_TOKEN y TELEGRAM_CHAT_ID son los mismos que ya usa
# el resumen diario (vars del entorno del servicio). Añade además:
# TELEGRAM_WEBHOOK_SECRET → secreto compartido con @BotFather
# (setWebhook secret_token). Sin él el webhook responde 503.
# TG_BOT_ENABLED → kill-switch ("false" apaga el bot).
- key: TELEGRAM_WEBHOOK_SECRET
sync: false
- key: TG_BOT_ENABLED
sync: false
# ── Tareas programadas — automatización con la config de Render ──
# Cron Jobs (type: cron, dentro de services): leen las variables del
# ENTORNO DE CADA JOB en Render (NO GitHub Secrets). Tras desplegar el
# Blueprint, crear a mano en cada cron job (Dashboard → job → Environment):
# · check-app-updates → MONGODB_URI (misma URI Atlas del web service);
# GITHUB_TOKEN es OPCIONAL (PAT de lectura pública: sin él, la API de
# GitHub limita a 60 req/hora y el monitor solo revisa ~60 apps).
# · daily-report-bot → TELEGRAM_BOT_TOKEN (canónico, el mismo de
# server.js), TELEGRAM_CHAT_ID, ADMIN_KEY y BACKEND_URL.
- type: cron
name: check-app-updates
runtime: node
rootDir: backend
schedule: "0 */12 * * *"
buildCommand: npm install
startCommand: node scripts/check-app-updates.js
envVars:
- key: MONGODB_URI
sync: false
- key: GITHUB_TOKEN
sync: false
- type: cron
name: daily-report-bot
runtime: python
rootDir: python
schedule: "0 3 * * *"
buildCommand: pip install -r requirements.txt
startCommand: python telegram_bot.py
envVars:
- key: TELEGRAM_BOT_TOKEN
sync: false
- key: TELEGRAM_CHAT_ID
sync: false
- key: ADMIN_KEY
sync: false
- key: BACKEND_URL
sync: false