Skip to main content
Go builds on slipway in a separate stage and ships a small runtime image, so the deployed container holds the binary rather than the toolchain.

Prerequisites

A Go module in a GitHub or GitLab repository, with a main package that serves HTTP.

Configure the app

Bind to 0.0.0.0 on the port you declare. A server bound to 127.0.0.1 cannot be reached from outside its own container.
main.go

Add slipway.yaml

slipway.yaml
The default build compiles the module’s main package. If you set a custom buildCommand, it owns the build stage and must write the binary to /out/app:
slipway.yaml

Add a database

slipway.yaml

Run migrations before the rollout

slipway.yaml
preDeploy runs in the freshly built image with the service’s resolved environment, and the deploy proceeds only if it exits 0.

Add a worker

A Go worker is the same build with no ports:
slipway.yaml

Next steps

CPU and memory

A Go service usually runs comfortably at the default allocation.

Service to service

Reach siblings by name.