Go
gy detects Go from go.mod, compiles a static binary in a multi-stage build, and ships a
minimal container.
Deploy
Section titled “Deploy”cd my-go-appgy deployExamples
Section titled “Examples”Standard library
Section titled “Standard library”package main
import ( "fmt" "net/http" "os")
func main() { port := os.Getenv("PORT") if port == "" { port = "8080" } http.HandleFunc("/", func(w http.ResponseWriter, r *http.Request) { fmt.Fprintln(w, "Hello from Ghaymah!") }) http.ListenAndServe(":"+port, nil)}gy deploy --port 8080gy deploy --name my-gin-apiCustomize
Section titled “Customize”gy deploy --tier t2 --name billing-serviceEnvironment variables
Section titled “Environment variables”db := os.Getenv("DATABASE_URL")gy config set env DATABASE_URL=postgres://...gy config sync