Publish to Heroku

  • Init git and commit your code.
    • git init
    • git add .
    • git commit -m "init project"
  • Login heroku
    • heroku login
  • Using Golang backpack
    • heroku create -b https://github.com/kr/heroku-buildpack-go.git
  • Vendoring: For Go 1.6 (refer here)
    • go get -u github.com/tools/godep
    • Save your dependency godep save github.com/kkdai/githubrss
    • Submit your depdendency
      • git add .
      • git commit -m "godep"
  • Push your complete code to Heroku
    • git push heroku master

Add “Deploy to Heroku”

  • copy app.json (refer more spec here)
  • Remember must include buildpack. And all buildpack list here.
  • Make sure your buildpack sync with what you use
    • In my case, I use https://github.com/kr/heroku-buildpack-go.git:
"buildpacks": [
    {
      "url": "https://github.com/kr/heroku-buildpack-go.git"
    },
    {
      "url": "heroku/go"
    }	

All app.json sample as follow (refer to rss-webserver):


Buy Me A Coffee

Evan

Attitude is everything