notebooks/workspaces/backend/Tiltfile

24 lines
575 B
Plaintext

load("ext://restart_process", "docker_build_with_restart")
local_resource(
"backend-bin",
"CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -o ../bin/backend cmd/main.go",
deps=["cmd", "internal", "go.mod", "go.sum"],
)
docker_build_with_restart(
"backend",
context="..", # this is where dev.Dockerfile lives
dockerfile="devenv/dev.Dockerfile",
entrypoint=["/backend"],
only=["bin/backend"],
live_update=[
sync("../bin/backend", "/backend"),
],
)
k8s_yaml("devenv/backend.yaml")
k8s_resource("backend", port_forwards=4000)