Language Frankfurt, Germany
Nodion recognizes Go by go.mod. The Go buildpack downloads your modules, builds static binaries with the newest Go release and starts your server, while the toolchain stays out of the run image. The app runs in Frankfurt, next to a managed PostgreSQL database if you need one.
go.modcmd/<name>PORT for the web process; listen on it on all interfaces. Gin's r.Run() without an address already uses PORT. With Echo, Fiber or Chi, pass ":" + port yourself. main.go package main
import (
"log"
"net/http"
"os"
)
func main() {
port := os.Getenv("PORT")
if port == "" {
port = "8080"
}
http.HandleFunc("/", func(w http.ResponseWriter, r *http.Request) {
w.Write([]byte("ok"))
})
log.Fatal(http.ListenAndServe(":"+port, nil))
} cmd/ folder, Nodion builds the module root into one binary. Each cmd/<name> with Go files becomes its own binary instead, and the root package is then not built. The web process runs the only binary, else the one named server, api, web or app, else the first; every other binary becomes a process type of the same name. cmd/server/main.go
cmd/worker/main.go
cmd/migrate/main.go CGO_ENABLED=0 and -ldflags "-s -w". If a dependency needs cgo, such as mattn/go-sqlite3, set CGO_ENABLED=1 with the Build flag on the Environment tab. A Build variable GOFLAGS_LDFLAGS replaces the ldflags, so include -s -w there if you want to keep them. DATABASE_URL arrives on the next deploy, and PostgreSQL drivers such as pgx accept it as it is. Your binaries are on the PATH at runtime, so a cmd/migrate binary can run as the release step, once per build before the new version starts. Procfile release: migrate cmd/worker becomes the process type worker. Add a process named worker without a port on the Processes tab and leave its command empty; it runs that binary. Name the web binary server, api, web or app so the web process does not pick another one.go line in go.mod and a .go-version file do not select an older toolchain: every build uses the newest Go release Nodion has built. Run your CI against the newest Go as well.DATABASE_URL, REDIS_URL or CLICKHOUSE_URL. release: line runs with every new build. Dockerfile apps, and redeploys or rollbacks to an earlier image, use a release command set on the app itself, which also takes precedence over the Procfile line. On static sites a release step runs in an image that holds only the built files. Yes. Nodion builds and starts your binary, whatever framework it uses; the server only has to listen on PORT. With Gin in go.sum, Nodion also sets GIN_MODE=release.
Always the newest Go release Nodion has built, currently 1.27.x. Older Go lines are not used for builds, even if go.mod names one.
No. The Go buildpack compiles your binaries and puts them into the run image without the Go toolchain. If you already have a Dockerfile, Nodion can build that instead.
In the EU Central region in Frankfurt, Germany. Build, registry, the app and its databases, volumes, buckets, logs and metrics stay in that region, and Nodion's API and control plane are hosted in Germany. Nodion GmbH is based in Stuttgart.
Nodion provides the basis for it: Nodion GmbH is based in Stuttgart, Germany, in the Frankfurt region the app, its databases and volumes run in Germany, and you conclude the data processing agreement (DPA) under Art. 28 GDPR electronically in the dashboard. Whether your setup complies also depends on how you configure and use the app.
An app instance starts at 1 EUR per month. The setup in the cost box costs 2.50 EUR per month: App 1 EUR, PostgreSQL 1.50 EUR. Prices are net and billed per second, and you pick bigger sizes or more instances whenever you need them.
Yes. Every app gets a default hostname with HTTPS. Add your own domain on the app's Domains tab; the TLS certificate is issued and renewed automatically.
Earn up to 15 € in credit when signing up.
or with email
Product news, no spam. Unsubscribe anytime.
Successfully subscribed.