Difference between revisions of "Heroku"

From Archiveteam
Jump to navigation Jump to search
(Create Heroku page)
 
Line 30: Line 30:
Heroku can use language-specific buildpacks or can deploy Docker images. Normally this is done via the command line, but it can also be done via the web browser if specific files are in your GitHub repo.
Heroku can use language-specific buildpacks or can deploy Docker images. Normally this is done via the command line, but it can also be done via the web browser if specific files are in your GitHub repo.


=== Required files for web deployability of Docker images ===
=== Required files for browser deployability of Docker images ===
==== app.json ====
==== app.json ====
Specifies what to display on the deployment webpage. See [https://devcenter.heroku.com/articles/app-json-schema app.json Schema for more details] Minimum properties are:
Specifies what to display on the deployment webpage. See [https://devcenter.heroku.com/articles/app-json-schema app.json Schema for more details] Minimum properties are:

Revision as of 05:51, 17 July 2021

Heroku is an online application hosting platform notable for its generous free tier. Heroku has a feature that can allow people to deploy apps to the platform without leaving their web browser.

Free Tier Details

Execution Hours and App Limits

  • 550 execution hours per month shared across up to 5 apps for accounts without credit card verification (this is about 74% to 82% of a given month)
  • 1000 execution hours per month shared across up to 100 apps for accounts with credit card verification (this is more than an entire month)
  • Execution hour limits seem to only be checked about once per day... so if an unverified account has used 549.99 hours when the daily check occurs all apps on the account will actually continue to run for another day before being stopped.
  • Apps that are enabled on accounts that have exhausted their monthly execution hours will automatically be restarted during the first day of the next month.

RAM

  • Free apps are limited to 512MB of RAM, going beyond this limit prints warning messages in the application logs. Reaching 1024MB (200% of the RAM limit) will cause an app to immediately be terminated and restarted.

Web Dynos

Web applications run on free accounts are shut off if they don't receive a request at least once every 30 minutes. Worker dynos are not subject to this limit and are not exposed to the web (unless something like ngrok is used). (For all platform users: web applications can only listen for incoming web traffic on Heroku-specified ports (HTTP/HTTPS/WebSocket). Worker dynos cannot directly listen for incoming traffic on any port.)

Platform Details

Bandwidth

All users are soft-limited 2TB of bandwidth per month[1]. This includes data downloaded and uploaded.

Storage

Apps have essentially unlimited temporary hard-disk storage. Storage is cleared whenever an app is restarted (by the user or platform) or redeployed.

Daily Restarts

Heroku automatically restarts apps every 24-27.6 hours when they are running.

Multiple Accounts

There is a policy against using automation to create multiple accounts, however a policy against creating multiple accounts in general has not been found.

Deploying to Heroku

Heroku can use language-specific buildpacks or can deploy Docker images. Normally this is done via the command line, but it can also be done via the web browser if specific files are in your GitHub repo.

Required files for browser deployability of Docker images

app.json

Specifies what to display on the deployment webpage. See app.json Schema for more details Minimum properties are:

{
  "name": "Whatever you want to display",
  "formation": {
    "worker": {
      "quantity": 1,
      "size": "free"
    }
  },
  "stack": "container"
}

Dockerfile

This can be a project Dockerfile or if housed in a separate repo from the main project it can simply contain:

FROM [whatever docker image address]

heroku.yml

Should contain the following. Additional documentation is available for more options.

build:
  docker:
    worker: Dockerfile

Deploy link

From your repo, link to https://heroku.com/deploy (referrer is used to determine what to deploy). Or link to https://heroku.com/deploy?template=[GitHub repo link]. An image badge can optionally be used.

Note that Git submodules are not supported when deploying via button.