Skip to content
This repository was archived by the owner on Oct 16, 2025. It is now read-only.

Beta Server

John Whitlock edited this page Nov 19, 2015 · 1 revision

The beta server is at http://browsercompat.herokuapp.com. It runs under Mozilla's Heroku account. If Heroku works well for serving the site, it may be used for the production server as well.

Scaling

The beta server runs with these processes:

  • web.1: Hobby ($7/month)
  • worker.1: Hobby ($7/month)

More and better processes may be deployed as needed.

Add-ons

The beta server runs with these add-ons:

Production tier processes may be deployed as needed.

Other Services

Email goes through jwhitlock's Amazon Simple Email Service account.

Mozilla's New Relic account is used to monitor service performance.

Configuration

The server is configured through environment variables, following the Heroku/twelve-factor methodology. The following settings are used:

  • ADMIN_EMAILS: comma-separated list of admin emails
  • ADMIN_NAMES: comma-separated list of admin names, matches ADMIN_EMAILS
  • ALLOWED_HOSTS: comma-separated list of allowed hostnames, including browsercompat.herokuapp.com
  • BROKER_URL: set to REDIS_URL
  • CELERY_ALWAYS_EAGER: 0 to use async tasks
  • CELERY_RESULT_BACKEND: set to REDIS_URL
  • DATABASE_URL: set by heroku-postgresql add-on
  • DEFAULT_FROM_EMAIL: set in Full Name <[email protected]> form
  • DJANGO_DEBUG: 0 to disable debug mode
  • EMAIL_HOST: SES hostname
  • EMAIL_HOST_PASSWORD: SES password
  • EMAIL_HOST_USER: SES username
  • EMAIL_PORT: 587 Mail Submission Agent port
  • EMAIL_SUBJECT_PREFIX: [browsercompat]
  • EMAIL_USE_TLS: 1
  • EXTRA_INSTALLED_APPS: unicorn
  • FXA_OAUTH_ENDPOINT: https://oauth-latest.dev.lcip.org/v1, Firefox Accounts dev OAuth endpoint
  • FXA_PROFILE_ENDPOINT: https://latest.dev.lcip.org/profile/v1, FxA dev profile endpoint
  • HEROKU_POSTGRESQL_xxx_URL: set by heroku-postgresql add-on, same as DATABASE_URL
  • MEMCACHIER_PASSWORD: set by memcachier add-on
  • MEMCACHIER_SERVERS: set by memcachier add-on
  • MEMCACHIER_USERNAME: set by memcachier add-on
  • NEW_RELIC_APP_NAME: browsercompat.herokuapp.com
  • NEW_RELIC_HIGH_SECURITY: 1, enforces settings that omit user data from analytics
  • NEW_RELIC_LABELS: Project:Mdn, groups beta server with developer.mozilla.org
  • NEW_RELIC_LICENSE_KEY: Mozilla's New Relic key
  • NEW_RELIC_LOG: stderr, allows viewing with heroku logs
  • NEW_RELIC_MONITOR_MODE: 1 enables monitoring
  • REDIS_URL: set by heroku-redis add-on
  • SECRET_KEY: set to random string
  • SECURE_PROXY_SSL_HEADER: HTTP_X_FORWARDED_PROTO,https, Heroku's SSL header
  • SERVER_EMAIL: set in Full Name <[email protected]> form
  • STATIC_ROOT: staticfiles, where Heroku puts files after ./manage.py collectstatic

Deployment

Deploying new code uses the standard Heroku process of pushing to master, assuming you named the git remote browsercompat:

git checkout master
git pull 
git push browsercompat

This will:

  • upgrade dependencies in requirements.txt
  • run ./manage.py collect static
  • restart the web and worker processes

You'll have to be a collaborator on the browsercompat app in Mozilla's Heroku account to push.

If the push includes migrations, those have to be run manually:

heroku run ./manage.py migrate

To record the deployment in New Relic, you can use tools/newrelic_record_deploy.sh:

export NEW_RELIC_API_KEY=get_from_new_relic
export NEW_RELIC_DEPLOY_APP_ID=browsercompat.herokuapp.com
export NEW_RELIC_DEPLOYER="My Name"
export NEW_RELIC_BRANCH="remotes/browsercompat/master"
tool/newrelic_record_deployment.sh
Clone this wiki locally