mirror of
https://github.com/fnproject/fn.git
synced 2022-10-28 21:29:17 +03:00
Starting on some examples to use with function tool.
This commit is contained in:
13
tool/README.md
Normal file
13
tool/README.md
Normal file
@@ -0,0 +1,13 @@
|
||||
|
||||
# Function Tool
|
||||
|
||||
The function tool is a tool to help you build and deploy functions to IronFunctions.
|
||||
|
||||
In your projects root folder, run:
|
||||
|
||||
```sh
|
||||
iron build
|
||||
```
|
||||
|
||||
This will iterate through your directories building any changed functions, bumping their version numbers and pushing them to Docker Hub.
|
||||
|
||||
1
tool/examples/hello/.gitignore
vendored
Normal file
1
tool/examples/hello/.gitignore
vendored
Normal file
@@ -0,0 +1 @@
|
||||
/hello
|
||||
7
tool/examples/hello/Dockerfile
Normal file
7
tool/examples/hello/Dockerfile
Normal file
@@ -0,0 +1,7 @@
|
||||
FROM iron/go:dev
|
||||
|
||||
ADD . /go/src/github.com/treeder/hello
|
||||
WORKDIR /go/src/github.com/treeder/hello
|
||||
RUN go build github.com/treeder/hello
|
||||
|
||||
ENTRYPOINT ["/go/src/github.com/treeder/hello/hello"]
|
||||
1
tool/examples/hello/VERSION
Normal file
1
tool/examples/hello/VERSION
Normal file
@@ -0,0 +1 @@
|
||||
0.0.1
|
||||
10
tool/examples/hello/hello.go
Normal file
10
tool/examples/hello/hello.go
Normal file
@@ -0,0 +1,10 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"os"
|
||||
)
|
||||
|
||||
func main() {
|
||||
fmt.Printf("Hello %v!\n", os.Getenv("PAYLOAD"))
|
||||
}
|
||||
Reference in New Issue
Block a user