Skip to content
This repository has been archived by the owner on Apr 15, 2019. It is now read-only.

canonical-web-and-design/developer.ubuntu.com-legacy

Repository files navigation

Deprecated: This project is for an old deprecated version of the developer.ubuntu.com project. For the current site code see canonical-websites/developer.ubuntu.com.


Not yet live: This fork of lp:developer-ubuntu-com is intended to become the new official codebase behind http://developer.ubuntu.com when it's ready.

Local development

The simplest way to run the site is to have docker installed and enabled for the current user, and then to run:

make run

This should serve the site on http://localhost:8017.

For more in-depth instructions, see HACKING.md.

Initial content

By default, the database won't be provisioned with any website content, so what you will see will look very similar to a vanilla Django CMS installation.

You can provide an initial site content database fixture at developer_portal/fixtures/initial_content.json, in which case the first time migrate is run it will import this initial content into the database.

You can instead provide a URL to retrieve this fixture from by setting the INITIAL_FIXTURE_URL environment variable, e.g.:

export INITIAL_FIXTURE_URL=https://example.com/fixtures/initial-content.json

in which case the initial run of migrate will download this file to developer_portal/fixtures/initial_content.json (if it doesn't already exist) before importing the fixture.

Official database snapshot

If you have access to the private developer-data repository, you can download the initial content from there.

  1. Ensure you're logged in to GitHub with an account which has access to ubuntudesign/developer-data.

  2. Visit https://github.com/ubuntudesign/developer-data/raw/master/initial-content.json, which will forward you to a new URL for the fixture containing an access token, something like:

    https://raw.githubusercontent.com/ubuntudesign/developer-data/master/initial-content.json?token=xxx
    
  3. Use this new URL to set the INITIAL_FIXTURE_URL, e.g.:

    export INITIAL_FIXTURE_URL="https://raw.githubusercontent.com/ubuntudesign/developer-data/master/initial-content.json?token=xxx"
    

    before runnning the site for the first time.