-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathconfig.example.yaml
More file actions
97 lines (86 loc) · 3.62 KB
/
config.example.yaml
File metadata and controls
97 lines (86 loc) · 3.62 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
# instant-lite-api configuration — sanitised example.
# Copy to config.yaml and fill in real values before running.
#
# The only environment variable the binary reads is CONFIG_PATH, defaulting
# to ./config.yaml. Secret overrides are documented per-field below; empty
# values in this file are picked up from the environment if set.
server:
port: "8080"
base_url: "http://localhost:8080" # public API URL this binary serves
marketing_url: "http://localhost:5173" # public website (redirects, emails, upgrade CTAs). Empty ⇒ those paths 404.
cookie_domain: "" # e.g. "example.com" to share session across api.example.com + example.com. Empty = host-only cookie (right default for single host + local dev).
allowed_origins: # CORS: exact-match allowlist echoed into Access-Control-Allow-Origin
- "http://localhost:5173"
- "http://localhost:3000"
read_timeout: "10s"
write_timeout: "30s"
idle_timeout: "60s"
database:
# Platform DB — stores users, resources, webhook deliveries, billing state.
platform_url: "" # env override: DATABASE_URL
# Customer DB — where we CREATE DATABASE and CREATE USER per token. Usually a
# separate Postgres from the platform DB for blast-radius reasons.
customer_url: "" # env override: CUSTOMER_DATABASE_URL
max_open_conns: 20
max_idle_conns: 5
redis:
# Valkey/Redis backend for rate limits + webhook payload storage. Empty URL
# puts the server into degraded mode (rate limiting + webhook storage fall
# back to Postgres or no-op; webhook lookups may be slower).
url: "redis://localhost:6379" # env override: REDIS_URL
github:
# GitHub OAuth app. Create one at github.com/settings/developers.
client_id: "" # env override: GITHUB_CLIENT_ID
client_secret: "" # env override: GITHUB_CLIENT_SECRET
redirect_uri: "http://localhost:8080/auth/github/callback"
razorpay:
# Leave blank to run without billing — endpoints that need it will 503 and
# the noopPayment provider is installed automatically.
key_id: "" # env override: RAZORPAY_KEY_ID
key_secret: "" # env override: RAZORPAY_KEY_SECRET
webhook_secret: "" # env override: RAZORPAY_WEBHOOK_SECRET
# Plan IDs from your Razorpay dashboard. USD/INR split supported; legacy
# PlanIDMonthly/PlanIDAnnual fields serve as USD fallbacks.
plan_id_usd_monthly: ""
plan_id_usd_yearly: ""
plan_id_inr_monthly: ""
plan_id_inr_yearly: ""
jwt:
# Sessions + API tokens. Generate via: openssl rand -hex 32
secret: "" # env override: JWT_SECRET (32+ bytes)
limits:
rate_requests_per_second: 10
rate_burst: 20
max_provisions_per_day: 5 # per /24 subnet (IPv6: /48)
anon_ttl: "24h"
max_request_body_bytes: 1048576
webhook_max_body_bytes: 1048576
webhook_max_stored: 100
ipv4_cidr_prefix: 24
ipv6_cidr_prefix: 48
reaper:
interval: "5m"
batch_size: 50
timeout: "60s"
postgres:
# Quotas applied to each provisioned database.
conn_limit: 2
storage_mb: 10
statement_timeout: "30s"
email:
# Leave smtp_host empty to disable email sending (no-op SendAsync).
smtp_host: ""
smtp_port: 587
smtp_user: ""
smtp_pass: ""
from_address: "no-reply@example.com"
from_name: "instant-lite"
observability:
# OpenTelemetry. Works with any OTLP backend (New Relic, Datadog, Grafana).
enabled: false
service_name: "instant-lite-api"
environment: "development"
exporter: "otlp" # "otlp" or "stdout"
otlp_endpoint: "localhost:4318"
otlp_insecure: true
sample_rate: 1.0