Skip to content

nm-examples/nickmoreton.co.uk

Repository files navigation

Nick Moreton's Wagtail-Powered Website 🚀

Wagtail Django Python

Welcome to the source code of www.nickmoreton.co.uk - a modern, Django-based website showcasing:

  • ⚡ Lightning-fast performance with Wagtail CMS
  • 🎨 Modern frontend architecture
  • 🚀 Production-ready deployment options
  • 📱 Responsive design throughout

Special thanks to Torchbox for providing my production hosting on the Heroku platform. 🙏

Setup for development

Copy the .env.example file to .env.

cp .env.example .env

Update the .env file with the correct value for your Heroku app name.

 HEROKU_APP_NAME=add-the-app-name

Running the development environment (quick start)

make quickstart
  • The quickstart will perform and initial build of the frontend assets.
  • You will be prompted for the admin username and password.
make run

View the site at http://localhost:8000

Running the development environment (step by step)

Copy the .env.example file to .env.

cp .env.example .env

Update the .env file with the correct value for your Heroku app name.

 HEROKU_APP_NAME=add-the-app-name

First build and run should include the following commands:

make build
make up
make migrate
make runserver

Then you can run the following command to start the development environment:

make run

View the site at http://localhost:8000 (frontend files may be missing, see below)

Create a superuser

make superuser

View the admin at http://localhost:8000/admin

Django-browser-reload will automatically reload the page in the browser when files are changed, see below for reloading the frontend and seeing the changes in the browser.

Developer setup (frontend)

Install the dependencies

nvm use
npm install

Build the frontend

npm run build

Build & watch the frontend

The wagtail app should be running in the background.

npm start

Django-browser-reload will automatically reload the page in the browser when the frontend files are updated.

Import data and media (from production)

The Heroku env vars are required to be set in the .env file for any make commands here.

make extract-vars

Import the database

make pull-data

Import the media

make pull-media

Deployment Options 🌍

Local Production-like Environment

Test your site in a production-like setup using:

Production Deployment

Did I mention the company I work for, Torchbox, provide the production hosting for my website on the Heroku platform. 🙏

Deploy to actual production using:

About

Welcome to the source code of www.nickmoreton.co.uk - a modern, Django/Wagtail based website

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors