This template contains everything you need to bootstrap a new Django project.
- Styling with TailwindCSS
- Javascript bundling and minifying with esbuild
- Modern Javascript stack with htmx and AlpineJS
- Live reload using Browsersync
- Project management with uv
- Automated production server configuration with Ansible.
- Automated Docker image deployment.
Install the following tools first.
Clone the project and clean up git.
Your can either delete .git or set the origin to your own repo:
git remote set-url origin <your-repo>
Copy the example app config file:
cp appconfig.example.env appconfig.env
Edit the file and change all the variables to your liking.
Execute the script named rename.sh
and it will ask you a bunch of
questions that will be used to baptise your new project.
Run just
to bootstrap the project. See the justfile for details.
Your project is now ready for you to ship features.
Executing the deploy.py
script will do the following:
- Build a Docker image containing the source code.
- Optionally make an tar archive of this image, and upload it to your server.
Configure this deployment script by creating a deploy.toml
file. See the deploy.example.toml
file for details.
I wrote a post about how to deploy a Django app without a container registry. Read it more details on how to setup your server to make this work.
Inside the ansible directory, you'll find the django role where there's automation for this.
License is MIT
Copyright 2022 Josh Karamuth