Build and deploy Heroku slugs on your local machine. Handy for deploying single-binary Go web applications.
mkdir -p ./app/bin
GOARCH=amd64 GOOS=linux go build -o ./app/bin/web main.go
tar czfv slug.tgz ./app
slugger
Slugger will parse the Procfile to determine process types. This example assumes a Procfile containing a single web process that accepts a -listen
argument, e.g.:
web: PATH=$PATH:$HOME/bin web -listen=:$PORT
The Heroku Dev Center has more information on building slugs from scratch.
Make sure you have a working Go installation (tested on 1.4+) and run:
go install github.com/nbio/slugger
golang
Slugger uses the fantastic heroku-go/v3 API client by Timothée Peignier. Extracted from and used in production at domainr.com.
© 2015–2018 nb.io, LLC