You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/cli/templates.md
+6-7Lines changed: 6 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -8,7 +8,7 @@ Before creating a new function make sure you pull in the official OpenFaaS langu
8
8
$ faas-cli template pull
9
9
```
10
10
11
-
This page shows how to generate functions in three of the most common languages and explains how to manage their dependencies.
11
+
This page shows how to generate functions in the most popular languages and explains how you can manage their dependencies too.
12
12
13
13
## 1.0 Go
14
14
@@ -182,13 +182,13 @@ You can use `getHeader(k)` on the Request interface to query a header.
182
182
183
183
To set a header such as content-type you can use `setHeader(k, v)` on the Response interface.
184
184
185
-
## 5.0 Customise a template
185
+
## 7.0 Customise a template
186
186
187
187
It is recommended that you use the official templates as they are provided and if there is a short-coming that you raise a GitHub issue so we can improve the templates for everyone.
188
188
189
189
All templates are driven by a Dockerfile and can be customised by editing the files found in the ./template folder.
190
190
191
-
### 5.1 Update the Dockerfile
191
+
### 7.1 Update the Dockerfile
192
192
193
193
There are several reasons why you may want to update your Dockerfile, just edit `./template/<language_name>/Dockerfile`.
194
194
@@ -198,7 +198,7 @@ There are several reasons why you may want to update your Dockerfile, just edit
198
198
199
199
* Try a new version of a base-image - it may be that the project is showing support for Node.js LTS, but you want the cutting-edge version, you can do that too
200
200
201
-
### 5.2 Update a template's configuration
201
+
### 7.2 Update a template's configuration
202
202
203
203
The name of a template is read from a "template.yml" file kept within the template folder: `./template/<language_name>/template.yml`
204
204
@@ -212,13 +212,13 @@ fprocess: dotnet ./root.dll
212
212
*`language` is the display name used for `faas-cli new --list`.
213
213
*`fprocess` provides the process to run for each invocation - i.e. your function
214
214
215
-
### 5.3 Use your own templates
215
+
### 7.3 Use your own templates
216
216
217
217
You can use your own Git repository for a custom or forked set of templates. This can be public or private.
218
218
219
219
See `faas-cli template pull` for more information.
220
220
221
-
### 6.0 ARM / Raspberry Pi
221
+
### 8.0 ARM / Raspberry Pi
222
222
223
223
Templates for ARM and Raspberry Pi are provided on a best-effort basis. If you can help with maintenance please let the project contributors know.
224
224
@@ -231,4 +231,3 @@ Type in `faas-cli new --list` and look for any languages ending in `-armhf`. You
231
231
For these platforms do the same as above and look for the `-arm64` suffix.
232
232
233
233
> It is easy to make your own templates so if you need to use this platform please convert one of the "regular" templates for your platform.
0 commit comments