Go Buildpack on App Platform

App Platform is a Platform-as-a-Service (PaaS) offering that allows developers to publish code directly to DigitalOcean servers without worrying about the underlying infrastructure.


How App Platform Builds Images

App Platform supports two ways to build an image for your app: Cloud Native Buildpacks and Dockerfiles.

When you give App Platform access to your code, it defaults to using a Dockerfile if one is present in the root of the directory or specified in the app spec. Otherwise, App Platform checks your code to determine what language or framework it uses. If it supports the language or framework, it chooses an appropriate resource type and uses the proper buildpack to build the app and deploy a container.

Go Applications using Buildpacks

App Platform looks for any of the following files to detect a Go application:

  • go.mod
  • Gopkg.toml
  • Godeps/Godeps.json
  • vendor/vendor.json
  • glide.yaml

If App Platform detects one of these files, it guides you through the remaining configuration and then builds the app with the appropriate buildpack.

App Platform uses the heroku-buildpack-go buildpack for detecting and building Golang applications.

Go Version

App Platform automatically uses the Go version specified in your go.mod file:

module github.com/digitalocean/sample-golang

go 1.16
...

Limits