Heroku is a PaaS (Platform as a Service) that can be used to deploy simple and small applications for free.
You will need a validated Heroku account (with the ability to use free add-ons). You can read about account verification in this Heroku Article. Verification is needed as the application uses the heroku-redis service.
To easily deploy this repository to Heroku, sign up for a Heroku account and click this button:
If you prefer to deploy to Heroku manually instead, follow the procedure described next.
Heroku will prompt you to add your OpenTok API key and OpenTok API secret, which you can obtain at the TokBox Dashboard.
You have to set the following environment variables on your Heroku instance:
TB_API_KEY
: Your OpenTok API key.TB_API_SECRET
: Your OpenTok API secret.
The following environment are optional and required only if you enable Archive Manager.
FB_DATA_URL
: (Optional) A Firebase database URL to store the archive list for each room.FB_AUTH_SECRET
: (Optional) The authentication secret for the previous URL.
You will need to install Heroku CLI tool. For information on downloading and using the heroku CLI, see their official documentation: https://devcenter.heroku.com/articles/heroku-cli.
First, create the app:
$ heroku create
Now you will have to set the following environment variables on your heroku instance. Replace <key>
and <secret>
with your OpenTok API key and the corresponding API secret:
$ heroku config:set TB_API_KEY=<key> TB_API_SECRET=<secret>
If you want to use Archive Management (In app playback and download of recordings), set up Firebase configuration. Replace <appurl>
with your Firebase application URL and <appsecret>
with the secret for that Firebase app in this command:
$ heroku config:set FB_DATA_URL=<appurl> FB_AUTH_SECRET=<appsecret> ENABLE_ARCHIVE_MANAGER=true
You will need to choose a redis addon. These two are currently supported,
- Heroku-redis: https://devcenter.heroku.com/articles/heroku-redis
- Redis-to-go: https://elements.heroku.com/addons/redistogo
The app uses heroku-redis, which you can set up like this:
heroku plugins:install heroku-redis
heroku addons:create heroku-redis:hobby-dev
You can deploy your code using git: https://devcenter.heroku.com/articles/git#deploying-code.
Additionally you can also modify all the other configuration options described in the main README.md file, using environment variables:
tb_archive_polling_initial_timeout
=> ARCHIVE_TIMEOUTtb_archive_polling_multiplier
=> TIMEOUT_MULTIPLIERtb_max_session_age
=> TB_MAX_SESSION_AGEtb_max_history_lifetime
=> EMPTY_ROOM_LIFETIMEallow_iframing
=> ALLOW_IFRAMINGvalid_refrers
=> VALID_REFERERSchrome_extension_id
=> CHROME_EXTENSION_ID