This project contains technical documentation written in Markdown in the /docs folder. The latest build (from the develop
branch) can be viewed online at:
https://nationalarchives.github.io/ds-wagtail/
You can also view it locally on http://localhost:8001/ which is booted as the docs
container.
Local development is done in Docker. You can find out more about this here.
Convenience commands have been added to fabfile.py
to help you interact with the various services. But, for any of these commands to work, you must first install Fabric.
Once installed, you can type fab -l
to see a list of available commands.
cp .env.example .env
fab start
This command takes care of the following:
- Building all of the necessary Docker containers
- Starting all of the necessary Docker containers
- Installing any new python dependencies
- Collect static assets
# Enter the shell for the web container
fab sh
# Run migrations
poetry run python manage.py migrate
# Run the development server
poetry run python manage.py runserver 0.0.0.0:8000
# ...from within the web container
python manage.py createsuperuser
# ...or on the host machine
fab create-superuser
Navigate to the admin URL in your browser, and sign in using the username/password combination you chose in the previous step.
If you are running a Unix based operating system, these alias commands may be useful to you to run inside the Docker container.
Running the development server:
djrun
Run migrations:
dj migrate
Create a super user:
dj createsuperuser
Check out the Local development gotchas page for solutions to common issues.