Sidewinder: Configured Django on your own server in 10 minutes
Today I would like to introduce Sidewinder, my Django starter kit.
My primary motivation to create it has been twofold:
- Explore what a new modern Django project template should have to provide a better experience
- Create an easy way to have a new Django project running on a virtual private server
The standard Django project template is pretty bare bones. At some point during development I'd probably install a couple of development and testing tools, setup auto-generated HTTP API reference documentation, install a job queue, switch to email-based login, and so on. Sidewinder solves that with the inclusion of popular and pretty standard third-party packages that are all configured to work together seemlessly. In a serious project it might make sense to start from scratch and do everything according to specific requirements, but my starter kit is mainly intended for indiehackers and tinkerers that might prefer to have everything at their disposal from the start.
Sidewinder also includes some nice touches for the development environment like a management command to reset development environment while simultaneously recreating a test superuser, the ability to login as any registered user in one click, automatic auto reloading of pages in a web browser, pre-commit hooks, test examples, and other goodies.
While providing any sort of functionality beyond authentication is outside of the scope of the project, I added some example pages for submitting a feedback or uploading an avatar. These pages are mainly for demonstration and testing, so it is easy to verify everything works once the application is started in a development environment or deployed on a server.
A big part of the work on Sidewinder has been the deployment story. My aim was to build a kit that will put your project on your own server in 10 minutes. The kit includes a complete Ansible playbook to provision a single Linux server with all necessary software infrastructure (a reverse proxy, database, Redis etc.) that can run a Django application with all the bells and whisles like serving static content, running a background queue or collecting logs. A set of commands is included for convenience to not only deploy the application, but also monitor and otherwise administer the server.
In the era of Docker images and containerized production environments it might be an odd choice to some. But I believe there are still people like me that want to run some side projects without breaking the bank. You can always deploy the project in any other means (especially so because everything is configured through environment variables). Sidewinder simply gives you one more deployment option.
Check out the Github repository and documentation.
You can also follow me on twitter for updates.
Let me know what you think!
Last updated on 3.8.2023.