There's a sample test in nucleus/base/tests.py
for your convenience, that
you can run using the following command:
python manage.py 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
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 both of them in 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.
- Make sure you have docker and docker-compose
- docker-compose up
-
Add your project in Docker Registry as Automated Build
-
Prepare a 'env' file with all the variables needed by dev, stage or production.
-
Run the image:
docker run --env-file env -p 80:8000 mozilla/nucleus
- heroku create
- heroku config:set DEBUG=False ALLOWED_HOSTS=.herokuapp.com, SECRET_KEY=something_secret DATABASE_URL gets populated by heroku once you setup a database.
- git push heroku master
A newrelic.ini file is already included. To enable NewRelic monitoring add two enviroment variables:
- NEW_RELIC_LICENSE_KEY
- NEW_RELIC_APP_NAME
See the full list of supported environment variables.
https://github.com/mozmeao/nucleus-config/ has public examples of deployments in k8s clusters in AWS & GCP.
We have https://gitlab.com/mozmeao/nucleus/pipelines set up as CI/CD for https://github.com/mozilla/nucleus via this .gitlab-ci.yml, which updates the config repo triggering https://gitlab.com/mozmeao/nucleus/pipelines configured by .gitlab-ci.yml in the config repo.