Skip to content

[WIP] Deployment onto Dokku

Michael Gecht edited this page Nov 11, 2017 · 1 revision

Introduction

This project is meant to be deployed onto a server running Dokku. The whole setup resemblances a proposed django-docker setup.

Note: In the current layout, with the Dockerfile residing under ./docker/dokku/Dockerfile you will need to install the dokku-dockerfile plugin and set the path accordingly.

Getting started

# Create app
$ dokku app:create clock

# Create PostgreSQL database and link it to the app
$ dokku postgres:create clock-postgres
$ dokku postgres:link clock-postgres clock

# Set the bare minimum configuration
$ dokku config:set --no-restart clock DJANGO_ADMIN_URL="/admin"
$ dokku config:set --no-restart clock DJANGO_ALLOWED_HOSTS=djangodocker.example.com
$ dokku config:set --no-restart clock DJANGO_SECRET_KEY=$(echo `openssl rand -base64 64` | tr -d ' ')
$ dokku config:set --no-restart clock DJANGO_SETTINGS_MODULE=config.settings.production

# Make sure the plugin `dokku-dockerfile` is installed
$ dokku dockerfile:set djangodocker docker/dokku/Dockerfile
Clone this wiki locally