All Projects → mashrikt → cookiecutter-django-dokku

mashrikt / cookiecutter-django-dokku

Licence: MIT License
A template for jumpstarting Django projects and deploying with Dokku.

Programming Languages

python
139335 projects - #7 most used programming language
shell
77523 projects
Dockerfile
14818 projects

Projects that are alternatives of or similar to cookiecutter-django-dokku

grafana on dokku
Dockerfile to run Grafana (monitoring) on Dokku (mini-Heroku)
Stars: ✭ 12 (-25%)
Mutual labels:  dokku
ptb-django-cookiecutter
A simple cookiecutter to create Python Telegram bots, wrapped with Django.
Stars: ✭ 21 (+31.25%)
Mutual labels:  cookiecutter
dokku-sentry
Deploy your own instance of Sentry onto Dokku!
Stars: ✭ 64 (+300%)
Mutual labels:  dokku
dokku-graphite
a graphite, grafana, statsd, carbon plugin for dokku
Stars: ✭ 47 (+193.75%)
Mutual labels:  dokku
kamu
You favorite book library
Stars: ✭ 65 (+306.25%)
Mutual labels:  dokku
dokku-posteio
Poste.io plugin for Dokku
Stars: ✭ 27 (+68.75%)
Mutual labels:  dokku
django-naqsh
Naqsh is a bootstrapping tool for quickly creating production-ready Django web services.
Stars: ✭ 47 (+193.75%)
Mutual labels:  cookiecutter
cookiedozer
📱 Cookiecutter for i18n Kivy Apps
Stars: ✭ 48 (+200%)
Mutual labels:  cookiecutter
dokku-rabbitmq
a rabbitmq plugin for dokku
Stars: ✭ 41 (+156.25%)
Mutual labels:  dokku
cookiecutter-pypackage
A cookiecutter template for Python package with heavy use of Github actions
Stars: ✭ 19 (+18.75%)
Mutual labels:  cookiecutter
fastapi-starter
A FastAPI based low code starter: Async SQLAlchemy, Postgres, React-Admin, pytest and cypress
Stars: ✭ 97 (+506.25%)
Mutual labels:  cookiecutter
painless-continuous-delivery
A cookiecutter for projects with continuous delivery baked in.
Stars: ✭ 46 (+187.5%)
Mutual labels:  cookiecutter
wpacked
📦 WPacked is a WordPress development starter kit with portability and immediate local development in mind.
Stars: ✭ 73 (+356.25%)
Mutual labels:  dokku
hovercraft-slides
🍪 A template for new Hovercraft presentation projects (impress.js slides in reStructuredText)
Stars: ✭ 12 (-25%)
Mutual labels:  cookiecutter
minio-dokku
Dockerfile to run Minio (S3 compatible storage) on Dokku (mini-Heroku)
Stars: ✭ 102 (+537.5%)
Mutual labels:  dokku
yehua
Make a project in 1 minute from a project template but keep updating it forever
Stars: ✭ 22 (+37.5%)
Mutual labels:  cookiecutter
cookiecutter-flask-skeleton
Flask Starter Project
Stars: ✭ 56 (+250%)
Mutual labels:  cookiecutter
cookiecutter-mopidy-ext
cookiecutter template for creating a Mopidy extension
Stars: ✭ 15 (-6.25%)
Mutual labels:  cookiecutter
py-generic-project
🍪 A cookiecutter template that creates a basic Python setuptools project, which can be later on augmented with various optional accessories.
Stars: ✭ 18 (+12.5%)
Mutual labels:  cookiecutter
cookiecutter-r-data-analysis
cookie cutter template for my r workflow
Stars: ✭ 19 (+18.75%)
Mutual labels:  cookiecutter

Cookiecutter Django Dokku

A template for jumpstarting Django projects and deploying with Dokku.

Build Status Python 3.6 Django 1.11 MIT license

Instead of using django-admin startproject to start a new Django application from scratch, you can use this cookiecutter project to start with a Dockerized application ready for Dokku deployment. Some additional common Django features like an extended User model with Email as identification token field, setting up restframework, etc can also be initialized during the initial project set up.

Dokku is a mini-Heroku, powered by Docker. It simplifies the process of building and managing the lifestyle of applications. Once Dokku is set up in a host, you can push codes via Git, just like Heroku.

Instructions below specify how to start your project from this cookiecutter template and also a guideline on how to set up Dokku on your server.

Requirements

Set Up A Project

cookiecutter gh:mashrikt/cookiecutter-django-dokku

Alt text

cd myproject
docker-compose up --build

Features

Optional Integrations

These can be setup during the initial project integration

Email User

  • Django by default ships with username as the identification token field. (ie. login with username) Select 'y' to email _user for using email instead.

Celery

  • Select 'y' to use_celery for Celery with a Redis backend for Distributed Tasks.

Sentry:

  • To configure sentry you have to add the SENTRY_DSN_URL and initialize it with your own DSN URL that sentry provides for your project.
dokku config:set myproject SENTRY_DSN_URL=MYSENTRYDSNURL

Django REST framework:

  • Django REST framework is a powerful and flexible toolkit for building Web APIs. Select 'y' to use_rest_framework prompt for this library.

django-allauth/django-rest-auth

By selecting 'y' to "use_auth_endpoints":

Restframework Docs

  • Again, if you're using Restframework, you can plug in the Restframework Docs as well.

Setting up Dokku on a Linux Server

# install the latest stable version of dokku
wget https://raw.githubusercontent.com/dokku/dokku/v0.12.10/bootstrap.sh;
sudo DOKKU_TAG=v0.12.10 bash bootstrap.sh

# Once the installation is complete, you can open a browser to setup your SSH key and virtualhost settings. 
# Open your browser and navigate to the host's IP address - or the domain you assigned to that IP previously
# Configure Dokku via the web admin.

# create the app
dokku apps:create myproject

# Set environtment variable for ALLOWED_HOSTS. 
# YOUR_HOST is the host's IP address - or the domain you assigned to that IP
dokku config:set ALLOWED_HOSTS=YOUR_HOST

# install the postgres plugin
sudo dokku plugin:install https://github.com/dokku/dokku-postgres.git

# create a postgres service
dokku postgres:create myproject-database

# link postgres service to the app
dokku postgres:link myproject-database myproject

# if your're using Celery, you need to setup Redis
# install the redis plugin
sudo dokku plugin:install https://github.com/dokku/dokku-redis.git redis

# create a redis service
dokku redis:create myproject-redis

# link postgres service to the app
dokku redis:link myproject-redis myproject

Deploying the app from your local machine

# add remote dokku url 
git remote add dokku [email protected]:myproject

# push your apllication 
git push dokku master

Reference

License

MIT License

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].