Configuring Errbit

Following the recommendation of 12factor.net, Errbit takes all of its configuration from environment variables. You can use dotenv, which is included in the Gemfile, to fill in any values that you can’t or won’t supply through the environment.

In order of precedence Errbit uses:

  1. Environment variables (for example MY_VALUE=abc bundle exec puma)
  2. Values provided in a .env file
  3. Default values from .env.default file

Configuration Parameters

Build-in Ruby on Rails parameters

Environment variable Description Default Default in container
RAILS_ENV Environment development production
PORT Port 3000 as default
RAILS_MAX_THREADS Rails max threads 3 as default
WEB_CONCURRENCY Number of CPU not set not set
RAILS_LOG_LEVEL Log level info info

Thruster parameters

Environment variable Description
THRUSTER_TLS_DOMAIN Domain name to get certificate e.g. errbit.example.com

You can look more about thruster env’s here.

rack-timeout parameters

Here.

Application parameters

Environment variable Description Default Default in container
MONGO_URL      
SECRET_KEY_BASE      
ERRBIT_HOST Hostname to use when building links back to Errbit errbit.example.com as default
ERRBIT_ADMIN_EMAIL      
ERRBIT_ADMIN_PASSWORD      
ERRBIT_ADMIN_USER      
ERRBIT_CONFIRM_ERR_ACTIONS      
ERRBIT_USER_HAS_USERNAME      
ERRBIT_USE_GRAVATAR      
ERRBIT_GRAVATAR_DEFAULT      
ERRBIT_EMAIL_FROM      
ERRBIT_ADMIN_EMAIL

E-Mail address of initial admin user

defaults to errbit@errbit.example.com

ERRBIT_ADMIN_PASSWORD

Password of initial admin user

defaults to some random string (see output of $ bundle exec rails db:seed)

ERRBIT_ADMIN_USER

Username of initial admin user

defaults to errbit

ERRBIT_CONFIRM_ERR_ACTIONS

Present confirmation dialogs when users act on errors

defaults to true

ERRBIT_USER_HAS_USERNAME

Allow users to have a username field

defaults to true

ERRBIT_USE_GRAVATAR

Enable gravatar

defaults to true

ERRBIT_GRAVATAR_DEFAULT

Default gravatar image (see https://en.gravatar.com/site/implement/images/)

identicon

ERRBIT_EMAIL_FROM

The value that should be set in the ‘from’ field for outgoing emails

defaults to errbit@example.com

ERRBIT_EMAIL_AT_NOTICES

Errbit notifies watchers via email after the set number of occurrences of the same error. [0] means notify on every occurrence.

defaults to [1,10,100]

ERRBIT_PER_APP_EMAIL_AT_NOTICES

Let every application have it’s own configuration rather than using ERRBIT_EMAIL_AT_NOTICES. If this value is true, you can configure each app using the web UI.

defaults to false

ERRBIT_NOTIFY_AT_NOTICES

Notify each application’s configured notification service after the set number of occurrences of the same error. [0] means notify on every occurrence.

defaults to [0]

ERRBIT_PER_APP_NOTIFY_AT_NOTICES

Let every application have its own configuration rather than using ERRBIT_NOTIFY_AT_NOTICES. If this value is set to true, you can configure each app using the web UI.

defaults to false

ERRBIT_PROBLEM_DESTROY_AFTER_DAYS

Number of days to keep errors in the database when running bundle exec rails errbit:clear_outdated

defaults to nil (off)

SECRET_KEY_BASE

For production environments, you should run bundle exec rails secret to generate a secret, unique key for this parameter

defaults to f258ed69266dc8ad0ca79363c3d2f945c388a9c5920fc9a1ae99a98fbb619f135001c6434849b625884a9405a60cd3d50fc3e3b07ecd38cbed7406a4fccdb59c

MONGO_URL

URL connection string for mongo in the form mongodb://username:password@example.com:port To more easily set up connections to third party mongo providers, you can call this value MONGODB_URI, MONGOLAB_URI, MONGOHQ_URL, MONGODB_URL or MONGO_URL

defaults to mongodb://localhost/errbit_<Rails.env>

GITHUB_URL

Use this URL for interacting GitHub. This is useful if you have a GitHub enterprise account and you’re using a URL other than https://github.com

defaults to https://github.com

GITHUB_API_URL

For GitHub enterprise accounts, the API URL could be something like https://github.example.com/api/v3

defaults to https://api.github.com

GITHUB_AUTHENTICATION

Allow GitHub sign-in via OAuth

defaults to true

GITHUB_CLIENT_ID

Client id of your GitHub application

GITHUB_SECRET

Secret key for your GitHub application

GITHUB_ORG_ID

ID of your GitHub organization. If set, Errbit will create user accounts for users in your GitHub organization who sign into Errbit without having a user account

GITHUB_ACCESS_SCOPE

OAuth scope to request from users when they sign in through GitHub

defaults to [repo]

GITHUB_SITE_TITLE

The title to use for GitHub. This value is whatever you want displayed in the Errbit UI when referring to GitHub.

defaults to GitHub

GOOGLE_AUTHENTICATION

Allow google sign-in via OAuth

defaults to true

GOOGLE_AUTO_PROVISION

Allow automatic account creation after sign-in via OAuth

GOOGLE_CLIENT_ID

Client id of your google application

GOOGLE_SECRET

Secret key for your google application

GOOGLE_REDIRECT_URI

The redirect URI for your application (useful if you want to redirect using HTTPS)

defaults to the HTTP location of ERRBIT_HOST

GOOGLE_AUTHORIZED_DOMAINS

A comma-delimited list of account domains that are permitted to sign-in (recommended to set when GOOGLE_AUTO_PROVISION is set to true)

GOOGLE_SITE_TITLE

The title to use for Google. This value is whatever you want displayed in the Errbit UI when referring to Google.

defaults to Google

EMAIL_DELIVERY_METHOD

:smtp or :sendmail, depending on how you want Errbit to send email

SMTP_SERVER

Server address for outgoing SMTP messages

SMTP_PORT

Server port for outgoing SMTP messages

SMTP_AUTHENTICATION

Authentication method for the SMTP connection (see http://guides.rubyonrails.org/action_mailer_basics.html#action-mailer-configuration)

SMTP_USERNAME

Username for SMTP auth, you could also set SENDGRID_USERNAME

SMTP_PASSWORD

Password for SMTP auth, you could also set SENDGRID_PASSWORD

SMTP_DOMAIN

HELO domain to set for outgoing SMTP messages, you can also use SENDGRID_DOMAIN

SMTP_ENABLE_STARTTLS_AUTO

Detects if STARTTLS is enabled in your SMTP server and starts to use it

SMTP_OPENSSL_VERIFY_MODE

When using TLS, you can set how OpenSSL checks the certificate. This is really useful if you need to validate a self-signed and/or a wildcard certificate. You can use the name of an OpenSSL verify constant (‘none’, ‘peer’, ‘client_once’, ‘fail_if_no_peer_cert’).

SENDMAIL_LOCATION

Path to sendmail

SENDMAIL_ARGUMENTS

Custom arguments for sendmail

DEVISE_MODULES

Devise modules to enable

defaults to [database_authenticatable,recoverable,rememberable,trackable,validatable,omniauthable]