Skip to content

Django Dokku template with celery and multi environment support

Notifications You must be signed in to change notification settings

Tirzono/django-dokku-template

Repository files navigation

Django Dokku Template

Template

Using this template to create a new Django app is easy:

django-admin.py startproject --template=https://github.com/Tirzono/django-dokku-template/archive/master.zip -e py,md,example,json,sh -n Procfile {{ project_name }} .

Configuration

Application

To create the app:

sudo dokku apps:create {{ project_name }}

Set your environment on the dokku server:

sudo dokku config:set {{ project_name }} DJANGO_SETTINGS_MODULE={{ project_name }}.settings.production
sudo dokku config:set {{ project_name }} SECRET_KEY=$(cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 32 | head -n 1)

Database

Install postgres and create a new database:

sudo dokku plugin:install https://github.com/dokku/dokku-postgres.git postgres
sudo dokku postgres:create {{ project_name }}
sudo dokku postgres:link {{ project_name }} {{ project_name }}

RabbitMQ

To create and couple RabbitMQ:

sudo dokku plugin:install https://github.com/dokku/dokku-rabbitmq.git rabbitmq
dokku rabbitmq:create {{ project_name }}
dokku rabbitmq:link {{ project_name }} {{ project_name }}

About

Django Dokku template with celery and multi environment support

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published