Heroku
From charlesreid1
heroku is a platform as a service for running web apps.
heroku: https://www.heroku.com/
platform as a service: https://en.wikipedia.org/wiki/Platform_as_a_service
Install heroku toolbelt using homebrew:
$ brew install heroku-toolbelt
Now update heroku client:
$ heroku update
Contents
Pipelines
To make a pipeline:
CI/deployment process has three steps:
- Development
- Staging
- Production
When you create a heroku pipeline, it creates a set of applications, one for each step of the CI/deployment process.
You can link the pipeline to a Github repo, and that enables you to make changes to the repo by making changes from Heroku directly.
I am not following these instructions well (https://devcenter.heroku.com/articles/pipelines) because they deviate from what I see. I'm getting very confused about apps, when apps are created, how they are created, when I need a production app, when an app is real, etc.
The nginx solo mode (https://github.com/heroku/heroku-buildpack-nginx/blob/master/config/nginx-solo-sample.conf.erb) in the heroku-buildpack-nginx repo seems to be what we want, and the static file hosting is just hosting files located in /app/public
.
Continuous Integration
ChatOps (Heroku plus Slack)
Link: https://devcenter.heroku.com/articles/chatops
ChatOps refers to a Slack application that integrates Heroku into a Slack channel and provides the user with actions that they can perform directly from Slack.
Scheduled Tasks
Heroku article on scheduled tasks
Normally if you have your own server, you would schedule tasks using cron.
If you are on a Heroku node, you must resort to higher-level options. Here are a few:
- use the Heroku Scheduler Add-On: https://elements.heroku.com/addons/scheduler(10 minute, hourly, or daily intervals or multiples thereof only)
- Celery (Python library) - powerful robust task queue/message system software that supports scheduled tasks
- APScheduler (Python library) - lightweight in-process task scheduler
Heroku Scheduler Add-On
To install the heroku scheduler add-on:
$ heroku addons:create scheduler:standard
Celery
Celery: http://www.celeryproject.org/
APScheduler
APScheduler (Advanced Python Scheduler): https://apscheduler.readthedocs.io/en/3.0/