-
Notifications
You must be signed in to change notification settings - Fork 27
Expand file tree
/
Copy pathrender.yaml
More file actions
91 lines (89 loc) · 3.07 KB
/
Copy pathrender.yaml
File metadata and controls
91 lines (89 loc) · 3.07 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
# Render.com Blueprint for the public buildwithstem.com site.
#
# Apply with `render blueprint apply` or by pointing a Render workspace
# at this repo. Defines:
# - buildwithstem-site: static site (landing, docs, playground iframe,
# embedded editor / player / app shell bundles)
# - buildwithstem-ai (optional): the Go AI proxy from server/cmd/ai-server.
# Disabled by default — uncomment when you want to expose a hosted
# copy of the proxy. The local-only flow keeps working without it.
#
# The static site is the only thing the site needs to function. The Go
# proxy is BYOK; visitors who want AI features can run it locally or you
# can opt into the hosted variant below.
services:
- type: web
name: buildwithstem-site
runtime: static
branch: main
buildCommand: |
curl -fsSL https://bun.sh/install | bash
export PATH=$HOME/.bun/bin:$PATH
bun install --frozen-lockfile
BUILD_MODE=oss bun run build
staticPublishPath: ./build/public
pullRequestPreviewsEnabled: true
headers:
- path: /*
name: X-Frame-Options
value: SAMEORIGIN
- path: /*
name: Referrer-Policy
value: no-referrer-when-downgrade
- path: /assets/*
name: Cache-Control
value: public, max-age=31536000, immutable
routes:
- type: rewrite
source: /play/*
destination: /play.html
- type: rewrite
source: /create/project
destination: /editor.html
- type: rewrite
source: /create/project/*
destination: /editor.html
- type: rewrite
source: /stem-editor/*
destination: /editor.html
- type: rewrite
source: /dashboard
destination: /shell.html
- type: rewrite
source: /dashboard/*
destination: /shell.html
- type: rewrite
source: /docs
destination: /index.html
- type: rewrite
source: /docs/*
destination: /index.html
- type: rewrite
source: /playground
destination: /index.html
- type: rewrite
source: /playground/*
destination: /index.html
- type: rewrite
source: /*
destination: /index.html
# Optional: hosted AI proxy. Visitors hit it from the editor when they
# set REACT_APP_SERVER_HOST=https://buildwithstem-ai.onrender.com (or
# the bound URL). The proxy fronts BYOK keys configured via env vars.
#
# - type: web
# name: buildwithstem-ai
# runtime: go
# branch: main
# rootDir: server
# buildCommand: go build -tags oss -trimpath -o ai-server ./cmd/ai-server
# startCommand: ./ai-server serve
# envVars:
# - key: BUILD_MODE
# value: oss
# - key: AI_SERVER_PORT
# value: "10000"
# - key: ANTHROPIC_API_KEY
# sync: false
# - key: OPENAI_API_KEY
# sync: false