mirror of
https://github.com/vinta/awesome-python.git
synced 2026-08-04 15:05:39 +00:00
feat(farm-aggregator): add Render deployment config
- render.yaml for one-click Render web service deploy - Fix PORT env var (Render sets $PORT, not $WEBHOOK_PORT) - Add farm-aggregator/.gitignore so .env stays local but .env.example commits - Commit .env.example so it's available after clone Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01KBD2dN2KEjzz3UQFa9hEpu
This commit is contained in:
parent
c0bdabd270
commit
f6514ef0f4
4 changed files with 80 additions and 1 deletions
32
farm-aggregator/.env.example
Normal file
32
farm-aggregator/.env.example
Normal file
|
|
@ -0,0 +1,32 @@
|
|||
# Anthropic
|
||||
ANTHROPIC_API_KEY=sk-ant-...
|
||||
|
||||
# AG-Refine (your Render deployment)
|
||||
AGREFINE_API_URL=https://ag-refine.onrender.com/api
|
||||
AGREFINE_API_KEY=
|
||||
|
||||
# Dropbox (OAuth2 long-lived refresh token — see README for setup)
|
||||
DROPBOX_APP_KEY=
|
||||
DROPBOX_APP_SECRET=
|
||||
DROPBOX_REFRESH_TOKEN=
|
||||
|
||||
# Dropbox folder paths (shared folders on your account)
|
||||
DROPBOX_INBOX_PATH=/Farm/Inbox
|
||||
DROPBOX_OUTBOX_PATH=/Farm/Summaries
|
||||
DROPBOX_DAIRYCOMP_PATH=/Farm/DairyComp
|
||||
DROPBOX_FEEDLYNC_PATH=/Farm/FeedLync
|
||||
|
||||
# WhatsApp Business API (Meta)
|
||||
# Leave blank to disable — summaries go to Dropbox only
|
||||
WHATSAPP_ACCESS_TOKEN=
|
||||
WHATSAPP_PHONE_ID=
|
||||
WHATSAPP_RECIPIENT=+1...
|
||||
|
||||
# TomTom (geofence webhooks received on this port)
|
||||
TOMTOM_API_KEY=wvJd...kqf0
|
||||
WEBHOOK_PORT=3001
|
||||
|
||||
# Schedule (cron syntax)
|
||||
PULSE_SCHEDULE=0 * * * * # hourly pulse
|
||||
DAILY_SCHEDULE=0 6 * * * # 06:00 daily digest
|
||||
WEEKLY_SCHEDULE=0 6 * * 1 # Monday 06:00 weekly report
|
||||
2
farm-aggregator/.gitignore
vendored
Normal file
2
farm-aggregator/.gitignore
vendored
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
.env
|
||||
node_modules/
|
||||
|
|
@ -31,7 +31,7 @@ export const config = {
|
|||
apiKey: process.env.TOMTOM_API_KEY ?? '',
|
||||
},
|
||||
server: {
|
||||
port: parseInt(process.env.WEBHOOK_PORT ?? '3001', 10),
|
||||
port: parseInt(process.env.PORT ?? process.env.WEBHOOK_PORT ?? '3001', 10),
|
||||
},
|
||||
schedule: {
|
||||
pulse: process.env.PULSE_SCHEDULE ?? '0 * * * *',
|
||||
|
|
|
|||
45
farm-aggregator/render.yaml
Normal file
45
farm-aggregator/render.yaml
Normal file
|
|
@ -0,0 +1,45 @@
|
|||
services:
|
||||
- type: web
|
||||
name: farm-aggregator
|
||||
runtime: node
|
||||
rootDir: farm-aggregator
|
||||
buildCommand: npm install
|
||||
startCommand: node index.js
|
||||
plan: starter
|
||||
envVars:
|
||||
- key: NODE_ENV
|
||||
value: production
|
||||
- key: ANTHROPIC_API_KEY
|
||||
sync: false
|
||||
- key: AGREFINE_API_URL
|
||||
value: https://ag-refine.onrender.com/api
|
||||
- key: AGREFINE_API_KEY
|
||||
sync: false
|
||||
- key: DROPBOX_APP_KEY
|
||||
sync: false
|
||||
- key: DROPBOX_APP_SECRET
|
||||
sync: false
|
||||
- key: DROPBOX_REFRESH_TOKEN
|
||||
sync: false
|
||||
- key: DROPBOX_INBOX_PATH
|
||||
value: /Farm/Inbox
|
||||
- key: DROPBOX_OUTBOX_PATH
|
||||
value: /Farm/Summaries
|
||||
- key: DROPBOX_DAIRYCOMP_PATH
|
||||
value: /Farm/DairyComp
|
||||
- key: DROPBOX_FEEDLYNC_PATH
|
||||
value: /Farm/FeedLync
|
||||
- key: WHATSAPP_ACCESS_TOKEN
|
||||
sync: false
|
||||
- key: WHATSAPP_PHONE_ID
|
||||
sync: false
|
||||
- key: WHATSAPP_RECIPIENT
|
||||
sync: false
|
||||
- key: TOMTOM_API_KEY
|
||||
sync: false
|
||||
- key: PULSE_SCHEDULE
|
||||
value: "0 * * * *"
|
||||
- key: DAILY_SCHEDULE
|
||||
value: "0 6 * * *"
|
||||
- key: WEEKLY_SCHEDULE
|
||||
value: "0 6 * * 1"
|
||||
Loading…
Add table
Add a link
Reference in a new issue