Press ENTER to search or ESC to close

Up and Running with Django, Docker and Let’s Encrypt | News - Ubiwhere

loading

0%

Bleeding Edge Technologies

with custom Research and Development

MAR 27 2017

Up and Running with Django, Docker and Let’s Encrypt

Ubiwhere

In an ideal world, software companies would have dedicated teams for tasks such as managing infrastructure, software development or deployments. However, depending on the size of the company/team, this separation between Development and Ops (information technology operations) may not always be feasible.  


At Ubiwhere we try to adhere to this methodology as much as possible, but there are times when our team becomes overwhelmed with their daily tasks. This means a developer can get “held up” waiting for the Sysadmin/Devops team to have time to help deploy a new app following recommended best practices.

This issue prompted a co-worker to spearhead the development of django-yadpt-starter, a small open-source tool to bootstrap new projects in Django, a Web Framework very near and dear to our heart. This tool essentially allows a developer to create a new Django project, based on our own custom Django Project Template with a fully automated setup using Docker Containers and a Let's Encrypt SSL certificate, all while adhering to recommended best practices.

A few key features:

  • Simplified initial setup with a single command and a couples answers;
  • Automatic generation and renewal of Let's Encrypt certificates;
  • Adheres to best practices;
  • Uses Docker and Docker-Compose;
  • Provides different environments: One without a valid certificate for local development and another with a valid certificate (for Production or Staging).

Now, any developer can create Production Ready Web Apps in minutes without “bothering” our sysadmin team, since this has already been validated by them.

Our main goal while building this tool was to package many moving parts in a consistent and reusable manner, all while keeping its usage simple.

We started with the obvious choice, Django Project Template, but quickly hit our first hurdle. At the time, Django didn’t have native support for passing extra context variables to project templates. Fortunately, we found a django package that allowed us to achieve this.

The next step was to create a docker-compose.yml configu

Email

Call

Map