Skip to content
Whaaaat's happening? Careers website... Mmmkay?
JavaScript CSS HTML Python Shell Dockerfile
Branch: master
Clone or download
glogiotatidis Merge pull request #519 from glogiotatidis/preserve-metadata
Preserve metadata on S3 when setting Cache-Control
Latest commit 7e03f1d Jan 24, 2020
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.github Add pull request template. (Fixes #489) (#506) Dec 30, 2019
bin Preserve metadata on S3 when setting Cache-Control Jan 24, 2020
careers Change assets.moz.works to assets.mozilla.net Jan 6, 2020
docs Bump docutils from 0.12 to 0.15.2 (#463) Sep 2, 2019
static Preserve static/.gitkeep. Apr 17, 2019
.adr-dir Issue 366 architecture docs (#385) Feb 13, 2019
.coveragerc [fix bug 1226514] Rebase on sugardough. Dec 1, 2015
.dockerignore add docs Mar 22, 2019
.editorconfig Internships page redesign (Fixes #467) (#492) Nov 12, 2019
.gitignore Add sqlite files to git ignore (#445) Aug 6, 2019
.gitlab-ci.yml switching runners Jan 10, 2020
.pyup.yml Update .pyup.yml Jul 31, 2018
.travis.yml [Fix #337][Fix #345][Fix #341] Static Site build scripts (#359) Feb 13, 2019
CODE_OF_CONDUCT.md Add Mozilla Code of Conduct file (#400) Apr 1, 2019
Dockerfile [Fix #418] Upgrade to Debian Buster / Python 3.8 (#419) Jul 15, 2019
LICENSE [fix bug 1226514] Rebase on sugardough. Dec 1, 2015
README.md Added push to prod instructions Jan 9, 2020
contribute.json Refresh contribute.json. (#440) Aug 6, 2019
docker-compose.yml [Fix #337][Fix #345][Fix #341] Static Site build scripts (#359) Feb 13, 2019
env-build [Fix #337][Fix #345][Fix #341] Static Site build scripts (#359) Feb 13, 2019
manage.py [fix bug 1226514] Rebase on sugardough. Dec 1, 2015
requirements.txt Upgrade to Django 2.2.9 Jan 24, 2020
runtime.txt [Fix #337][Fix #345][Fix #341] Static Site build scripts (#359) Feb 13, 2019
setup.cfg [fix bug 1226514] Rebase on sugardough. Dec 1, 2015
setup.py [fix bug 1226514] Rebase on sugardough. Dec 1, 2015

README.md

Lumbergh

What's Deployed? Documentation RTFM Pipeline

Lumbergh is a Django based App for https://careers.mozilla.org. Follow the Setup your environment for development instructions to improve the website and fix errors.

Careers.mozilla.org website is a static website which is automatically generated from its Django counterpart. If you're interested to learn how what works and how to debug potential issues visit the Career's Mana Page

Setup your environment for development

  1. Get Docker and Docker Compose
  2. Run Build command
  3. Create local .env file (optional)
  4. Run the website

Commands

Build

docker-compose build

Create local .env file

You probably want to add a couple local environment settings to improve local dev:

  1. In the root of the project, create a file named .env
  2. Add ENGAGE_ROBOTS=False - this will prevent robots from indexing the site if you happen to build locally and push to a URL that shouldn't be indexed.
  3. Add SKIP_POSTS=True - this will avoid hitting the Wordpress API with each load of the home page (making page loads much faster). Change to False and re-start the server to fetch blog posts.

Run the website locally

docker-compose up

Run the tests

docker-compose run web ./manage.py test

Sync with Greenhouse

docker-compose run web ./manage.py sync_greenhouse

Close everything

docker-compose stop

Testing the static build locally

Ensure the site is running via docker-compose up, then:

  1. Get a command line inside the Docker container: docker exec -it lumbergh_web_1 /bin/bash
  2. In the Docker container, build the site: ./bin/mirror.sh - this will create a _site folder in the root of your project
  3. On your machine, cd _site and start a little web server: python -m SimpleHTTPServer 8001 (or python -m http.server 8001 if you're on python 2.7)
  4. Open your browser to http://localhost:8001 and you should see the newly built static site.

Pushing to production

  1. Verify all is good on the staging site
  2. Make sure your local master branch is up to date
  3. Push the master branch to the prod branch: git push origin master:prod

You can watch the deployment on GitLab. A notice will be posted in #careers-notify on Slack when the push has completed.

Code of Conduct

This repository is governed by Mozilla's Community Participation Guidelines and Developer Etiquette Guidelines.

You can’t perform that action at this time.