Skip to content

Commit

Permalink
Fixup Fly config and add Makefile
Browse files Browse the repository at this point in the history
Signed-off-by: Byron Ruth <[email protected]>
  • Loading branch information
bruth committed May 31, 2022
1 parent 2aeb4cf commit bc04d67
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 0 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
dist
16 changes: 16 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
GOOS=$(shell go env GOOS)
GOARCH=$(shell go env GOARCH)

build:
mkdir -p dist/$(GOOS)-$(GOARCH)
go build -o dist/$(GOOS)-$(GOARCH)/kmm ./cmd/kmm

zip:
cd dist/$(GOOS)-$(GOARCH) && zip ../$(GOOS)-$(GOARCH).zip kmm

dist:
GOOS=linux GOARCH=amd64 make build zip
GOOS=darwin GOARCH=amd64 make build zip
GOOS=windows GOARCH=amd64 make build zip

.PHONY: dist
3 changes: 3 additions & 0 deletions fly.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ processes = []
[build]
builder = "paketobuildpacks/builder:base"
buildpacks = ["gcr.io/paketo-buildpacks/go"]
[build.args]
BP_GO_TARGETS = "./cmd/kmm"

[env]
PORT = "8080"
Expand All @@ -17,6 +19,7 @@ processes = []
[experimental]
allowed_public_ports = []
auto_rollback = true
cmd = ["kmm", "serve", "--http.addr=0.0.0.0:8080"]

[[services]]
http_checks = []
Expand Down

0 comments on commit bc04d67

Please sign in to comment.