Repository navigation
Expand file tree
/
Copy pathrender.yaml
More file actions
41 lines (39 loc) · 1.46 KB
/
Copy pathrender.yaml
File metadata and controls
41 lines (39 loc) · 1.46 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
# Blueprint for the two services that can be declared today: the database and the
# cron trigger.
#
# Blueprints do not yet support Workflow services, so the Workflow itself is
# created separately (Dashboard → New → Workflow, same repo). This is a two-step
# setup, not a one-click deploy — see "Deploy" in the README.
databases:
- name: sync-db
databaseName: sync
user: sync
plan: basic-256mb
postgresMajorVersion: "17"
# Same region as the Workflow service, so it is reachable over the private
# network and DATABASE_URL can stay internal.
region: oregon
services:
- type: cron
name: api-sync-trigger
runtime: python
plan: starter
region: oregon
# Every 30 minutes. Anything shorter than SYNC_OVERLAP_SECONDS (300s) mostly
# re-syncs the overlap buffer; the upsert makes that safe, just wasteful.
schedule: "*/30 * * * *"
buildCommand: pip install -r requirements.txt
startCommand: python cron/trigger.py
envVars:
# Set both of these by hand after creating the Workflow service: the task
# slug does not exist until the Workflow does.
- key: RENDER_API_KEY
sync: false
- key: WORKFLOW_TASK_SLUG
sync: false
- key: POLL_INTERVAL_SECONDS
value: "30"
# Watch a little past run_sync's own 3600s task timeout, so the run's
# timeout is always what resolves it rather than the watcher giving up.
- key: MAX_WAIT_SECONDS
value: "5400"