main package into a binary, and runs it as processes. The web process runs the binary that serves HTTP, background workers and cron jobs can run other binaries from the same module, and jobs run migrations before each deployment.
Framework guides
net/http
Deploy a JSON API on the standard library, with Go 1.22 routing patterns and a graceful shutdown.
Gin
Deploy Gin in release mode, with the visitor’s IP address from Cloudflare’s header.
Echo
Deploy Echo v5, which shuts down gracefully on its own.
Fiber
Deploy Fiber v3, with the proxy settings that make
c.IP() and c.Scheme() right.How Go applications run on Sevalla
Every process (web, worker, cron job and job) runs from the same image, each with its own start command. See Processes for every process type and its settings.
Pin the Go version
Thego line in go.mod is the oldest Go release that builds the module, and go mod init sets it to the release you run, such as go 1.27.1. Ingot builds on Go 1.27, its default line, whenever the module allows it, and on the newest maintained line that satisfies the module otherwise. A new Ingot release can move the default to a newer Go line, which Go’s compatibility promise covers.
Ingot takes the version from the first of these that’s set:
- The
INGOT_GO_VERSIONenvironment variable, marked Available during buildtime, such as1.26. versions.goin ingot.json, such as{ "versions": { "go": "1.26" } }.- The
toolchainline, then thegoline, ofgo.workwhen the repository has one, otherwise ofgo.mod. Both are minimums.
ingot.json or with INGOT_GO_VERSION: 1.26 builds on the newest Go 1.26 release. The build plan’s Go row shows the version and where it came from, for example go.mod "go 1.27.1" or ingot.json "1.26".
A go line newer than every Go release Ingot knows fails the build with no go version in this Ingot release satisfies ">=1.28.0" (newest known: 1.27.3). Set the line to a release Ingot knows with go mod edit -go=1.27.0. See Set the language version.
Build with a Dockerfile
Ingot needs no Dockerfile, but you can write your own for full control of the image. A Dockerfile for Go on Sevalla builds in agolang image of the line go.mod asks for, copies go.mod and go.sum and runs go mod download before it copies the code, so a code change reuses the downloaded modules, and builds with CGO_ENABLED=0. The final stage needs the binary, /bin/sh for the web terminal and custom start commands, and CA certificates, which alpine has, and runs as a user other than root. A server that handles SIGTERM itself needs no init process. Each guide has one: see Gin for a module with dependencies, and net/http for one without.