Repository navigation
Expand file tree
/
Copy pathtemplate.yaml
More file actions
35 lines (31 loc) · 1.96 KB
/
Copy pathtemplate.yaml
File metadata and controls
35 lines (31 loc) · 1.96 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
# This file is used by `render workflows init` to scaffold new projects.
# It tells the CLI how to display this template and what instructions to show
# after scaffolding. You can safely ignore it when using this example directly.
name: Webhook Processing
description: GitHub webhook receiver that verifies signatures, acks fast, and processes each delivery once in a retrying task, with Postgres
workflowsRoot: .
renderBuildCommand: pip install -r requirements.txt
renderStartCommand: python workflow.py
nextSteps:
- label: Enter your project directory
command: cd {{dir}}
- label: Create a local database
command: createdb webhook_processing
hint: Needs a local Postgres. The receiver creates the tables when it starts.
- label: Add your settings
command: cp .env.example .env
hint: Then set DATABASE_URL and GITHUB_WEBHOOK_SECRET in .env (any random string works locally). The local task server loads .env when it starts, so do this first.
- label: Start your local task server
command: render workflows dev -- {{startCommand}}
hint: This runs the workflow service locally.
- label: Start the receiver (in another terminal)
command: RENDER_USE_LOCAL_DEV=true .venv/bin/python -m uvicorn receiver:app --env-file .env --port 8000
hint: RENDER_USE_LOCAL_DEV points the receiver's Render client at your local task server, so it needs no Render API key.
- label: Send a signed test delivery (in a third terminal)
command: .venv/bin/python send_delivery.py deliveries/issue-opened.json
hint: Returns 202 with the run ID. Send it again with --delivery-id <id> to see a redelivery return 200 with "duplicate":true.
- label: Deploy to Render
hint: |
If this project is the repository root, remove both rootDir entries from render.yaml.
Push the project to your repository, then deploy the Blueprint with the Render CLI or Dashboard.
See the README for both paths, the RENDER_API_KEY it asks for, and the GitHub webhook to add.