This tutorial assumes that you've installed and configured:
$ git clone https://github.com/mraym/demo-golang-drie-app.git
$ cd demo-golang-drie-app $ go install # creates the binary which is ultimately run in the Procfile $ godep save ./... # creates the Go dependencies file needed by the buildpack $ export PORT=5000 # need to set a PORT environment var $ demo-golang-drie-app # starts the server
This should start the app at http://localhost:5000/say-hello-drie
$ drie app add UNIQUE_APP_NAME # adds the app to drie $ drie app deploy # deploys the app on drie $ drie app scale 1 # starts the app scaled to 1 instance
At the moment, you will have to periodically run 'drie app show' on the deploy and scale commands and wait for the status to change from 'deploying' to 'deployed'.
$ drie app show App demo-golang-drie-app ======================== status: deployed id: d1218d6c-fb09-4d52-9dec-f475bb0013e3 deployed commit: 32fe73cbea109218d5f97d904a5b886b1ed887a4 build repo: https://github.com/mraym/demo-golang-drie-app.git web address ====== web_UNIQUE_APP_NAME.app.drie.co processes ====== 1 web config ====== REPO_URI=https://github.com/mraym/demo-golang-drie-app.git
After a while, the status of your app will be 'deployed' and the web address will become available:
Congratulations! Your Go REST API app is now deployed on drie!