-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrender.yaml
More file actions
71 lines (65 loc) · 2.85 KB
/
render.yaml
File metadata and controls
71 lines (65 loc) · 2.85 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
# Render Blueprint — describes how to deploy this service.
# Render reads this file when you import the repo as a Blueprint
# (dashboard → "New +" → "Blueprint" → paste the GitHub URL).
#
# Free tier caveats baked in here:
# - `plan: free` → 512 MB RAM, shared CPU, sleeps after 15 min
# of inactivity. First request after a sleep cold-starts the
# container (~30 s). Acceptable for portfolio / demo; not for
# anything user-facing under steady load.
# - Disk is ephemeral on the free plan, so SQLite resets on every
# deploy / restart. Fine for demoing the UI; persist data by
# switching DATABASE_URL to a Neon / Supabase free Postgres
# instance once you outgrow that.
#
# Secrets (`sync: false`) are deliberately NOT in this file — they
# get prompted in the Render dashboard the first time you sync the
# Blueprint, then stored encrypted at rest by Render.
services:
- type: web
name: qr-code-generator
runtime: docker
plan: free
region: singapore # closest to Taiwan / HK / SEA users
branch: main
# The healthcheck endpoint must return 200 quickly. /api/auth/me
# always 200s (`{"user": null}` when not signed in), no DB write,
# no auth required — perfect liveness probe.
healthCheckPath: /api/auth/me
envVars:
# Switches off /docs, /redoc, /openapi.json, also enables
# Secure cookies + disables the dev-only no-cache middleware.
- key: DEPLOY_ENV
value: production
# MUST be set explicitly post-deploy: copy the public URL
# Render assigns ("https://qr-code-generator-xxxx.onrender.com")
# into the dashboard. Until you do, short URLs in the UI fall
# back to localhost:8000 and 404 for visitors.
- key: BASE_URL
sync: false
# SQLite in the container filesystem — ephemeral on free plan.
# For persistence: provision a Neon Postgres free DB and set
# DATABASE_URL=postgresql+psycopg://user:pass@ep-xxx.neon.tech/db
# (and add psycopg[binary] to requirements.txt).
- key: DATABASE_URL
value: sqlite:///./qr_code.db
# --- GitHub OAuth ---
# Register a new OAuth app at github.com/settings/developers
# with the production callback:
# https://<your-render-url>/api/auth/github/callback
# Then paste the client id + secret in the Render dashboard.
- key: GITHUB_CLIENT_ID
sync: false
- key: GITHUB_CLIENT_SECRET
sync: false
# --- Email (Resend) ---
# Sign up at resend.com (free tier: 3000 emails/month, 100/day).
# For testing without verifying a domain, use the test sender
# `onboarding@resend.dev` — replace once you verify a domain
# so emails don't go to spam.
- key: EMAIL_PROVIDER
value: resend
- key: RESEND_API_KEY
sync: false
- key: EMAIL_FROM
value: onboarding@resend.dev