{"id":18118035,"url":"https://github.com/mozilla/nucleus","last_synced_at":"2026-03-07T18:31:07.438Z","repository":{"id":10331757,"uuid":"12462913","full_name":"mozilla/nucleus","owner":"mozilla","description":"Modern publishing for mozilla.org","archived":false,"fork":false,"pushed_at":"2026-01-15T13:37:01.000Z","size":2613,"stargazers_count":20,"open_issues_count":22,"forks_count":25,"subscribers_count":9,"default_branch":"master","last_synced_at":"2026-01-15T17:37:46.891Z","etag":null,"topics":["django","mozilla","python"],"latest_commit_sha":null,"homepage":"https://wiki.mozilla.org/Websites/Mozilla.org/Publishing","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mozilla.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2013-08-29T14:51:07.000Z","updated_at":"2026-01-15T13:26:12.000Z","dependencies_parsed_at":"2023-02-19T11:00:36.063Z","dependency_job_id":"4b68207a-3694-4683-ab83-13437212e348","html_url":"https://github.com/mozilla/nucleus","commit_stats":{"total_commits":252,"total_committers":20,"mean_commits":12.6,"dds":0.6468253968253967,"last_synced_commit":"91f2aeea96ebbacee7557325adac344a6f39c45c"},"previous_names":[],"tags_count":54,"template":false,"template_full_name":null,"purl":"pkg:github/mozilla/nucleus","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mozilla%2Fnucleus","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mozilla%2Fnucleus/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mozilla%2Fnucleus/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mozilla%2Fnucleus/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mozilla","download_url":"https://codeload.github.com/mozilla/nucleus/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mozilla%2Fnucleus/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30226245,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-07T18:12:09.766Z","status":"ssl_error","status_checked_at":"2026-03-07T18:11:58.786Z","response_time":53,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["django","mozilla","python"],"created_at":"2024-11-01T05:08:05.920Z","updated_at":"2026-03-07T18:31:07.209Z","avatar_url":"https://github.com/mozilla.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"Nucleus\n=======\n\nThe publication platform for Mozilla's marketing websites.\n\nDocker for development\n----------------------\n\nMake sure you have [docker](https://www.docker.com/products/docker-desktop) and\n[docker compose](https://github.com/docker/compose). After those are setup and running\nyou can use the following commands:\n\n```bash\n# This file must exist and you can customize environment variables for local dev in it\ntouch .env\n# this pulls our latest builds from the docker hub.\n# it's optional but will speed up your builds considerably.\ndocker compose pull\n# get the site up and running\ndocker compose up web\n```\n\nIf you've made changes to the `Dockerfile` or the `requirements/*.txt` files you'll need to rebuild\nthe image to run the app and tests:\n\n```bash\ndocker compose build web\n```\n\nThen to run the app you run the `docker compose up web` command again, or for running tests against your local changes you run:\n\n```bash\ndocker compose run --rm test\n```\n\nWe use pytest for running tests. So if you'd like to craft your own pytest command to run individual test files or something\nyou can do so by passing in a command to the above:\n\n```bash\ndocker compose run --rm test py.test nucleus/base/tests.py\n```\n\nAnd if you need to debug a running container, you can open another terminal to your nucleus code and run the following:\n\n```bash\ndocker compose exec web bash\n# or\ndocker compose exec web python manage.py shell\n```\n\nManaging Python dependencies\n----------------------------\n\nFor Python we use [pip-compile-multi](https://pypi.org/project/pip-compile-multi/) to manage dependencies expressed in our requirements\nfiles. `pip-compile-multi` is wrapped up in Makefile commands, to ensure we use it consistently.\n\nIf you add a new Python dependency (e.g. to `requirements/prod.in` or `requirements/dev.in`) you can generate a pinned and hash-marked\naddition to our requirements files by running:\n\n```bash\nmake compile-requirements\n```\n\nand committing any changes that are made. Please re-build your docker image and test it with `make build test` to be sure the dependency\ndoes not cause a regression.\n\nSimilarly, if you *upgrade* a pinned dependency in an `*.in` file, run `make compile-requirements` then rebuild, test and commit the results.\n\nTo check for stale Python dependencies (basically `pip list -o` but in the Docker container):\n\n```bash\nmake check-requirements\n```\n\nInstall Python requirements locally\n-----------------------------------\n\nIdeally, do this in a virtual environment (eg a `venv` or `virtualenv`)\n\n```bash\nmake install-local-python-deps\n```\n\nDocker for deploying to production\n-----------------------------------\n\n1. Add your project in [Docker Registry](https://registry.hub.docker.com/) as [Automated Build](http://docs.docker.com/docker-hub/builds/)\n2. Prepare a 'env' file with all the variables needed by dev, stage or production.\n3. Run the image:\n\n```bash\ndocker run --env-file env -p 80:8000 mozilla/nucleus\n```\n\nRelease Notes UI (React)\n------------------------\n\nThis project includes a small React component embedded into the Django admin to manage release notes.\n\n\u003e **Note:** Built JS is committed to the repo. No need to rebuild unless you're changing the React code.\n\nIf you need to make changes to the UI:\n\n1. Install dependencies (only once):\n   ```bash\n   npm install\n   ```\n\n2. Build the JS bundle:\n   ```bash\n   npm run build\n   ```\n\n3. Run Django's `collectstatic` to include the bundle:\n   ```bash\n   python manage.py collectstatic\n   ```\n\nFiles of interest:\n- React entry point: `frontend/release-notes.jsx`\n- Compiled output: `nucleus/rna/static/js/release-notes.js`\n- Mount point: `note-table` div in `nucleus/rna/templates/admin/rna/release/change_form.html`\n\nThe file can be linted by running `npm run lint` to check for errors using ESLint.\n\nHeroku\n------\n\n1. heroku create\n2. heroku config:set DEBUG=False ALLOWED_HOSTS=\u003cfoobar\u003e.herokuapp.com, SECRET_KEY=something_secret\n   DATABASE_URL gets populated by heroku once you setup a database.\n3. git push heroku master\n\n## Kubernetes\n\n\u003chttps://github.com/mozmeao/nucleus-config/\u003e has public examples of deployments in k8s clusters in AWS \u0026 GCP.\n\n## Github Actions CI/CD\n\nUnit tests are run via a GHA in the mozilla/nucleus repo \u003chttps://github.com/mozilla/nucleus/actions\u003e\n\nDeployments are handled via the (private) \u003chttps://github.com/mozilla-sre-deploy/deploy-nucleus/\u003e repo\n\nWe no longer use GitLab for CI/CD for Nucleus\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmozilla%2Fnucleus","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmozilla%2Fnucleus","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmozilla%2Fnucleus/lists"}