In this article, we will tell you the steps you need to set up Heroku Dyno for IronWorker.
- Create a Heroku App
- Install Heroku CLI
- Deploy Your App
- Pros & Cons
1. Create a Heroku App
On your Heroku dashboard, click on “Create new app”, specify the app name and the region and click “Create app”.
That is all you need to start deploying your app to Heroku.
The install steps generally are
- Install Heroku app based on your OS
- On the terminal run the login command $ heroku login it will redirect you to the browser page for authentication.
- Or run $ heroku login -i to enter credentials on terminal
3. Deploy your app
Create a new local directory and run $ init git, or add Heroku app to an existing git tracked directory.
Run $Heroky create to create a new Heroku App ( a random name will be given)
Or specify your existing app name to add Heroku app to the directory
$ heroku git:clone -a xe-alert-node
Commit your local changes $ git add. & $ git commit -m “Commit Message” then run $ git push heroku [BRANCH_NAME] Your application will be deployed to Heroku Dyno now as a web dyno.
To access your app run $heroku open it will open a new browser window with your app public subdomain.
To view the console log run $ heroku logs --tail
In order to add your .env variables to the Heroku Dyno Enviroment run $
heroku config:set $(cat .env | sed '/^$/d; /#[[:print:]]*$/d')
Raed more on Heroku dyno environment variables here:
Easy to setup, powerful documentation, big community, super fast on deploying and running.
8. Pros & Cons
Dyno is a lightweight CaaS service that allows rapid deployment of applications and containers. It’s mainly designed for application deployment and supports running as a worker.
Compared to IronWorker task scheduling not supported, offers dedicated clusters for performance-m & performance-l dyno types only. Concurrency limits are the lowest among other competitors.