Repository navigation
Expand file tree
/
Copy pathrender.yaml
More file actions
112 lines (101 loc) · 5.25 KB
/
Copy pathrender.yaml
File metadata and controls
112 lines (101 loc) · 5.25 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
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
# Render Blueprint — the deploy target.
#
# Render builds the committed `Dockerfile` directly, which is the whole reason it
# is the target: Firebase App Hosting failed three times inside its Node
# buildpack, each time for a different reason and none reproducible locally (the
# Dockerfile header has the three, and README has the issue links). Nothing in
# this file is framework detection — the image is built and run as written.
#
# Create it once with: Render Dashboard -> New -> Blueprint -> point at this repo.
# The three `sync: false` values below are prompted for during that flow and are
# never committed.
services:
- name: actuo
type: web
runtime: docker
# Closest region to the demo's users and to the Supabase project. Moving it
# is a dashboard change, not a code one.
region: singapore
# NOT `free`: the Angular SSR build and the Nest build run in the same image
# build, and the free plan's build memory is not enough for them. Free
# instances also spin down when idle, and a cold start here is a Nest boot
# behind an image pull.
plan: starter
dockerfilePath: ./Dockerfile
dockerContext: .
# Already attached in the dashboard; declared here so the repo is the record
# of what this service answers on. Every hostname listed must also appear in
# NG_ALLOWED_HOSTS below, or its pages 400.
domains:
- actuo.programmersingh.dev
# `/api/health` is @Public() — it is the one route that answers before any
# credential exists, which is what makes it usable as a probe. A 5xx here
# means Nest booted but its own health route is failing, not that a secret
# is missing; EnvService raises at call time, so a bad secret surfaces on the
# routes that need it rather than as a container that will not start.
healthCheckPath: /api/health
envVars:
# Angular checks the Host header against an allowlist (SSRF protection).
# A miss on a configured list is a 400 text/plain, naming the host; only
# an EMPTY list falls back to client-side rendering instead.
#
# Comma-separated, and UNIONED with angular.json's own
# security.allowedHosts rather than replacing it — AngularAppEngine builds
# `new Set([...envList, ...manifest.allowedHosts])` — so localhost keeps
# working no matter what is listed here.
#
# `*.onrender.com` is a suffix match (hostname.endsWith('.onrender.com')),
# kept so preview hostnames render. The custom domain is listed exactly:
# `*.programmersingh.dev` would admit every other subdomain of that zone.
#
# Verify after deploying: the HTML for `/` must contain `ng-server-context`
# on every hostname the service answers on.
- key: NG_ALLOWED_HOSTS
value: "*.onrender.com,actuo.programmersingh.dev"
# The origin this deploy calls its own — read TWICE, and changing it needs
# a REBUILD, not a restart.
#
# * At build time by stamp-seo.mjs. Render turns a service env var into a
# Docker build argument automatically and the Dockerfile declares
# `ARG PUBLIC_ORIGIN` to receive it. The public pages are prerendered,
# so `<loc>`, `og:image` and `canonical` are baked before the image
# finishes — there is no request to derive an origin from.
# * At runtime by server.mjs, which 308-redirects page requests arriving
# on any other host here. Unset, that redirect is simply off.
#
# It must carry the scheme: stamp-seo.mjs substitutes it verbatim, so a
# bare hostname produces a `<loc>` that is not a URL.
- key: PUBLIC_ORIGIN
value: https://actuo.programmersingh.dev
# Not a credential; the service-role key below is.
- key: SUPABASE_URL
value: https://dfzgtalbqtcadgupwklo.supabase.co
- key: BASE_CURRENCY
value: INR
# Prompted once at Blueprint creation, then stored by Render. Never
# committed, and deliberately not build-time: the build never touches
# Supabase or signs a token, and a secret readable at build time is a
# secret in the build logs.
- key: SUPABASE_SERVICE_ROLE_KEY
sync: false
- key: JWT_ACCESS_SECRET
sync: false
- key: JWT_REFRESH_SECRET
sync: false
# The embedded currency converter (PRD §6.5). A full URL, not a bare
# origin, because a converter need not sit at the root of its host — a
# GitHub Pages project site is `<user>.github.io/<repo>/` — and the
# `?actuo=` handshake is appended to it. Consumers derive the origin with
# `new URL(...).origin` for `getTools({fromOrigins})`.
#
# It must NOT be this app's own origin: `getTools({fromOrigins})` would
# return same-origin tools, which the Copilot filters out, and the
# cross-origin path would prove nothing. Cambiaro is a genuinely separate
# deployment, which is the point.
#
# RUNTIME only: nothing about it is prerendered, so changing it needs a
# restart rather than the rebuild PUBLIC_ORIGIN above needs.
- key: CONVERTER_URL
value: https://cambiaro.programmersingh.dev/
# PORT is injected by Render and must not be set here. server.mjs reads it and
# falls back to 8080, and binds 0.0.0.0 so the container is reachable.