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.
The simplest way to run the site is to have docker installed and enabled for the current user, and then to run:
make run
Some yaml:
this:
is: yaml
yes: 1
#!/bin/sh
if ! username=$(snapctl get username); then
echo "Username is required"
exit 1
fi
if ! password=$(snapctl get password); then
echo "Password is required"
exit 1
fi
# Handle username and password, perhaps write to a credential file of some sort.
echo "user=$username" > $SNAP_DATA/credentials
echo "password=$password" >> $SNAP_DATA/credentials
chmod 600 $SNAP_DATA/credentials
def a_function(arg, arg2=val):
This should serve the site on http://localhost:8017
.
For more in-depth instructions, see HACKING.md.
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_CONTENT_FIXTURE=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.
If you have access to the private developer-data repository, you can download the initial content from there.
-
Ensure you're logged in to GitHub with an account which has access to ubuntudesign/developer-data.
-
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
-
Use this new URL to set the
INITIAL_CONTENT_FIXTURE
, e.g.:export INITIAL_CONTENT_FIXTURE=https://raw.githubusercontent.com/ubuntudesign/developer-data/master/initial-content.json?token=xxx
before runnning the site for the first time.