A Cookiecutter For Each Deployment Strategy

Article by Wayne Fagan. Published on 5 Feb, 2020.

I was first introduced to Cookiecutter Django when I joined GiantMade as a software engineer. I thought it was an amazing tool to generate environment ready base Django projects, which could be used as a foundation for any project.

The software engineers at GiantMade had developed the cookiecutter to such an extent that it would setup your local environment, and provision the initial cloud infrasture which the project would depend on with only a few commands.

Since my early days at GiantMade I have become more familiar with Cookiecutter Django, and I've been able to develop my own bespoke cookiecutters. Currently I have 2, both are using django-CMS, one set up with a target VPS deployment, and the other to Heroku.

I initially started off with one cookiecutter which simply generated a Django project which had a few basic apps, which I considered to be sufficient for testing. Since then it has now diverged into 2 separate cookiecutters.

The underpinning of each cookiecutter is a Makefile which is specific to each environment and deployment strategy.

To date both cookiecutters have been developed to create initial dockerized projects, and are able to be deployed to either a VPS or Heroku rather quickly as a result of the Makefile.

It has definately been a worthwhile experience learning about Cookiecutter Django, and I'm sure I'll learn more about this tool as I continue to refine both of the cookiecutters I have developed so far.