-
Notifications
You must be signed in to change notification settings - Fork 20
Expand file tree
/
Copy pathspin.toml
More file actions
145 lines (117 loc) · 4.15 KB
/
spin.toml
File metadata and controls
145 lines (117 loc) · 4.15 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
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
spin_manifest_version = 2
[application]
name = "spin-docs"
version = "0.1.0"
description = "Spin website running on... Spin."
authors = ["Spin Maintainers <spin@cncf.io>"]
[application.trigger.http]
base = "/"
[[trigger.http]]
id = "trigger-bartholomew"
component = "bartholomew"
route = "/..."
[[trigger.http]]
id = "trigger-fileserver-static"
component = "fileserver-static"
route = "/static/..."
[[trigger.http]]
id = "trigger-fileserver-downloads"
component = "fileserver-downloads"
route = "/downloads/..."
[[trigger.http]]
id = "trigger-hub-fileserver-static"
component = "hub-fileserver-static"
route = "/hub/..."
[[trigger.http]]
id = "trigger-redirect-blog-index"
component = "redirect-blog-index"
route = "/blog"
[[trigger.http]]
id = "trigger-spin-version-proxy"
component = "spin-version-proxy"
route = "/:page"
[[trigger.http]]
id = "trigger-bartholomew-spin-v1"
component = "bartholomew-spin-v1"
route = "/spin/v1/..."
[[trigger.http]]
id = "trigger-bartholomew-spin-v2"
component = "bartholomew-spin-v2"
route = "/spin/v2/..."
[[trigger.http]]
id = "trigger-bartholomew-spin-v3"
component = "bartholomew-spin-v3"
route = "/spin/v3/..."
[[trigger.http]]
id = "trigger-well-known"
component = "well-known"
route = "/.well-known/..."
[component.well-known]
source = "modules/spin_static_fs.wasm"
files = [{ source = "well-known/", destination = "/" }]
[component.bartholomew]
# Using build from bartholomew main
source = "modules/bartholomew.wasm"
environment = { PREVIEW_MODE = "0" }
files = ["content/**/*", "templates/*", "scripts/*", "config/*", "shortcodes/*"]
[component.bartholomew.build]
command = "npm run build-index && npm run build-hub-index"
watch = ["content/**/*", "templates/*"]
[component.fileserver-static]
source = "modules/spin_static_fs.wasm"
files = [{ source = "static/", destination = "/" }]
[component.fileserver-static.build]
command = ["npm run bundle-scripts-ci"]
[component.fileserver-downloads]
source = "modules/spin_static_fs.wasm"
files = [{ source = "downloads/", destination = "/" }]
[component.hub-fileserver-static]
source = { url = "https://github.com/spinframework/spin-fileserver/releases/download/v0.0.2/spin_static_fs.wasm", digest = "sha256:65456bf4e84cf81b62075e761b2b0afaffaef2d0aeda521b245150f76b96421b" }
environment = { FALLBACK_PATH = "./index.html" }
files = [{ source = "spin-up-hub/dist/", destination = "/" }]
[component.hub-fileserver-static.build]
command = "npm run build"
workdir = "spin-up-hub"
# Component to give us clean versioned URLs for spin from the root
[component.spin-version-proxy]
source = "modules/spin-redirecter.wasm"
variables = { latest_spin_version = "v3" }
files = ["spin-redirect.json"]
exclude_files = ["**/node_modules"]
allowed_outbound_hosts = ["http://self"]
# Need to modify action to get the js2wasm plugin
# [component.build]
# workdir = "spin-redirecter"
# command = "npm install && npm run build"
[component.bartholomew-spin-v1]
# Using build from bartholomew main
source = "modules/bartholomew.wasm"
environment = { PREVIEW_MODE = "0" }
files = ["content/**/*", "templates/*", "scripts/*", "config/*", "shortcodes/*"]
[component.bartholomew-spin-v1.build]
command = "npm run build-index && npm run build-hub-index"
watch = ["content/**/*", "templates/*"]
[component.bartholomew-spin-v2]
# Using build from bartholomew main
source = "modules/bartholomew.wasm"
environment = { PREVIEW_MODE = "0" }
files = ["content/**/*", "templates/*", "scripts/*", "config/*", "shortcodes/*"]
[component.bartholomew-spin-v2.build]
command = "npm run build-index && npm run build-hub-index"
watch = ["content/**/*", "templates/*"]
[component.bartholomew-spin-v3]
# Using build from bartholomew main
source = "modules/bartholomew.wasm"
environment = { PREVIEW_MODE = "0" }
files = ["content/**/*", "templates/*", "scripts/*", "config/*", "shortcodes/*"]
[[trigger.http]]
id = "trigger-redirect-kubernetes"
component = "redirect-kubernetes"
route = "/kubernetes"
[component.redirect-kubernetes]
source = "modules/redirect.wasm"
environment = { DESTINATION = "/deploying", STATUSCODE = "301" }
# Redirect /blog to /blog/index
[component.redirect-blog-index]
source = "modules/redirect.wasm"
environment = { DESTINATION = "/blog/index" }