mirror of
https://github.com/fnproject/fn.git
synced 2022-10-28 21:29:17 +03:00
31 lines
566 B
Go
31 lines
566 B
Go
package langs
|
|
|
|
type LambdaNodeHelper struct {
|
|
BaseHelper
|
|
}
|
|
|
|
func (lh *LambdaNodeHelper) BuildFromImage() string {
|
|
return "funcy/lambda:node-4"
|
|
}
|
|
|
|
func (lh *LambdaNodeHelper) IsMultiStage() bool {
|
|
return false
|
|
}
|
|
|
|
func (lh *LambdaNodeHelper) Cmd() string {
|
|
return "func.handler"
|
|
}
|
|
|
|
func (h *LambdaNodeHelper) DockerfileBuildCmds() []string {
|
|
r := []string{}
|
|
if exists("package.json") {
|
|
r = append(r,
|
|
"ADD package.json /function/",
|
|
"RUN npm install",
|
|
)
|
|
}
|
|
// single stage build for this one, so add files
|
|
r = append(r, "ADD . /function/")
|
|
return r
|
|
}
|