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. 🙏
Copy the .env.example file to .env.
cp .env.example .envUpdate the .env file with the correct value for your Heroku app name.
HEROKU_APP_NAME=add-the-app-namemake quickstart- The quickstart will perform and initial build of the frontend assets.
- You will be prompted for the admin username and password.
make runView the site at http://localhost:8000
Copy the .env.example file to .env.
cp .env.example .envUpdate the .env file with the correct value for your Heroku app name.
HEROKU_APP_NAME=add-the-app-nameFirst 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 runView the site at http://localhost:8000 (frontend files may be missing, see below)
Create a superuser
make superuserView 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.
nvm use
npm installnpm run buildThe wagtail app should be running in the background.
npm startDjango-browser-reload will automatically reload the page in the browser when the frontend files are updated.
The Heroku env vars are required to be set in the .env file for any make commands here.
make extract-varsmake pull-datamake pull-mediaTest your site in a production-like setup using:
- OrbStack for containerization
- Dokku for PaaS functionality ➡️ Local Dokku Setup Guide
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:
- Linode (Akamai Cloud) for hosting
- Dokku for deployment management ➡️ Production Setup Guide