maanantai 14. joulukuuta 2015

Learning Herokuapp

Heroku is a cloud application platform designed for developers. You can focus on developing and heroku does the rest. Publishing is through best practises; GIT. Software developers prefer using command line tools so Heroku is built that way. Heroku lets app developers spend their time on developing, not managing servers. Deployment, ongoing operations or scaling are easy to do in heroku.

To get started register your account at https://www.heroku.com/ next install heroku toolbelt which is command line tool to use heroku. First make sure you have Ruby installed in your system, if not then

sudo apt-get install ruby-full

After that install heroku toolbelt 


After installation do:

heroku login and login with your credentials. After that you are logged in. Next create a project in some folder.

heroku create creates a new "server" for you. You can name it how you want as long as its not already taken. Like heroku create lollero

Then create a new folder for your project, add files and commit then normally. After that add your heroku remote with command:

heroku git:remote -a lollero

Now you can deploy your app just by typing git push heroku master

If you have multiple heroku remotes, just check them with:

git remote -v

and then push to another heroku app:

git push herokuappname master

IF heroku complains about public key, just simply add it before pushing:
heroku keys:add ~/.ssh/id_rsa.pub

and ta-da, your application is about to be deployed. In herokuapp you can also set custom domain names for your project, rollback versions etc.

heroku releases shows all your releases.
heroku rollback v5 rolls back to version you wanted.

Buildback defines your application language. To add buildbacks:

heroku buildpacks:set heroku/nodejs
heroku buildpacks:add https://github.com/username/package.git 

https://devcenter.heroku.com/articles/buildpacks#detection-failure

Read heroku log with heroku logs --tail

Set heroku configuration variables with command: heroku config:set IS_HEROKU=TRUE

To read more about heroku:

Heroku devcenter has very good documentation: https://devcenter.heroku.com/start

Ei kommentteja:

Lähetä kommentti