Service powering snippets on Firefox's about:home.
Python JavaScript HTML Other
Latest commit e8c90e9 Nov 21, 2016 @glogiotatidis glogiotatidis committed on GitHub Merge pull request #221 from glogiotatidis/bug-1316644
[bug 1316644] Send to metrics servers.


Build Status

What's deployed?


Run the tests

There's a sample test in snippets/base/ for your convenience, that you can run using the following command:

python test

If you want to run the full suite, with flake8 and coverage, you may use tox. This will run the tests the same way they are run by travis):

pip install tox

The .travis.yml file will also run coveralls by default.

If you want to benefit from Travis and Coveralls, you will need to activate them both for your project.

Oh, and you might want to change the "Build Status" and "Coverage Status" links at the top of this file to point to your own travis and coveralls accounts.

Docker for development

  1. Make sure you have docker and docker-compose
  2. docker-compose up

Docker for deploying to production

  1. Add your project in Docker Registry as Automated Build
  2. Prepare a 'env' file with all the variables needed by dev, stage or production.
  3. Run the image:

    docker run --env-file env -p 80:8000 mozmar/snippets


  1. heroku create
  2. heroku config:set DEBUG=False, SECRET_KEY=something_secret DATABASE_URL gets populated by heroku once you setup a database.
  3. git push heroku master

NewRelic Monitoring

A newrelic.ini file is already included. To enable NewRelic monitoring add two enviroment variables:


See the full list of supported environment variables.