Deploy guide · runtime = "docker"
Ship Go in ~2 minutes.
Plain Go using `net/http` from the standard library. The template uses a multi-stage Dockerfile with a `distroless/nonroot` runtime image — the final image is ~10 MB and contains only the compiled binary.
Why Percher fits
- Distroless image means very small attack surface and instant cold starts.
- Static binary, no runtime dependencies — the Dockerfile is dead simple and the build is fast.
Quick start
bunx percher create my-app --template go
cd my-app
bunx percher publishThe first command scaffolds a working Go project plus a percher.toml. Publish builds and deploys it, then prints the live URL.
percher.toml
The canonical config for a Go app on Percher. bunx percher init generates this automatically when it detects Go in your project.
[app]
name = "my-api"
runtime = "docker"
framework = "go"
[web]
port = 8080
health = "/health"
Common gotchas
- Set `CGO_ENABLED=0` in the build stage if you don't need cgo — the resulting binary is fully static and runs on distroless.
- `net/http`'s `ListenAndServe` should bind to `:8080` (matching the toml port) — `localhost:8080` won't be reachable from the container's network.