forked from paketo-buildpacks/puma
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathbuild.go
More file actions
30 lines (26 loc) · 698 Bytes
/
build.go
File metadata and controls
30 lines (26 loc) · 698 Bytes
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
package puma
import (
"github.com/paketo-buildpacks/packit/v2"
"github.com/paketo-buildpacks/packit/v2/scribe"
)
func Build(logger scribe.Emitter) packit.BuildFunc {
return func(context packit.BuildContext) (packit.BuildResult, error) {
logger.Title("%s %s", context.BuildpackInfo.Name, context.BuildpackInfo.Version)
args := `bundle exec puma --bind tcp://0.0.0.0:${PORT:-9292}`
processes := []packit.Process{
{
Type: "web",
Command: "bash",
Args: []string{"-c", args},
Default: true,
Direct: true,
},
}
logger.LaunchProcesses(processes)
return packit.BuildResult{
Launch: packit.LaunchMetadata{
Processes: processes,
},
}, nil
}
}