All Projects → 0xadada → Dockdj

0xadada / Dockdj

Licence: mit
🚢 A recipe for building 12-factor Python / Django web apps with multi-container Docker and deploying to Amazon AWS using Elastic Beanstalk.

Programming Languages

python
139335 projects - #7 most used programming language

Labels

Projects that are alternatives of or similar to Dockdj

Urljects
Deprecated! (Django routing without urls.py files, inspired by Flask.)
Stars: ✭ 53 (-7.02%)
Mutual labels:  django
Flight Ticket Booksystem
大三下数据库课设 - 机票预订系统 - Django
Stars: ✭ 55 (-3.51%)
Mutual labels:  django
Awesome Python Primer
自学入门 Python 优质中文资源索引,包含 书籍 / 文档 / 视频,适用于 爬虫 / Web / 数据分析 / 机器学习 方向
Stars: ✭ 57 (+0%)
Mutual labels:  django
Django Airports
✈️ It's like django-cities, but django-airports
Stars: ✭ 54 (-5.26%)
Mutual labels:  django
Dj Paypal
Paypal integration for Django - Inspired by Dj-Stripe
Stars: ✭ 55 (-3.51%)
Mutual labels:  django
Open Semantic Search Apps
Python/Django based webapps and web user interfaces for search, structure (meta data management like thesaurus, ontologies, annotations and named entities) and data import (ETL like text extraction, OCR and crawling filesystems or websites)
Stars: ✭ 55 (-3.51%)
Mutual labels:  django
Django Rest Framework Tricks
Collection of various tricks for Django REST framework.
Stars: ✭ 52 (-8.77%)
Mutual labels:  django
Django Tsvector Field
Django field for tsvector (PostgreSQL full text search vector) with managed stored procedure and triggers.
Stars: ✭ 56 (-1.75%)
Mutual labels:  django
Django Icons
Icons for Django
Stars: ✭ 55 (-3.51%)
Mutual labels:  django
Evalai
☁️ 🚀 📊 📈 Evaluating state of the art in AI
Stars: ✭ 1,087 (+1807.02%)
Mutual labels:  django
River Admin
🚀 A shiny admin interface for django-river built with DRF, Vue & Vuetify
Stars: ✭ 55 (-3.51%)
Mutual labels:  django
Django Extra Views
Django's class-based generic views are awesome, let's have more of them.
Stars: ✭ 1,078 (+1791.23%)
Mutual labels:  django
Django Places
A django app for store places with autocomplete
Stars: ✭ 55 (-3.51%)
Mutual labels:  django
Kala App
Kala Document Management System
Stars: ✭ 53 (-7.02%)
Mutual labels:  django
Visit nepal
An app to help tourists learn more about Nepal.
Stars: ✭ 57 (+0%)
Mutual labels:  django
Channelstream
Channelstream is a websocket communication server for web applications
Stars: ✭ 52 (-8.77%)
Mutual labels:  django
Zing
Translation server for continuous localization.
Stars: ✭ 55 (-3.51%)
Mutual labels:  django
Api automation test
接口自动化测试平台,已停止维护,看心情改改
Stars: ✭ 1,092 (+1815.79%)
Mutual labels:  django
Django Enum Choices
Django choice field that supports Python enumerations
Stars: ✭ 57 (+0%)
Mutual labels:  django
Django Minicms
Django 开发简易的内容管理系统
Stars: ✭ 56 (-1.75%)
Mutual labels:  django

dockdj

🚢 A recipe for building 12-factor Python / Django web apps with multi-container Docker and deploying to Amazon AWS using Elastic Beanstalk.

No Maintenance Intended

The aim of Dockdj is to provide an example of how to quickly create a Django web application following the Twelve Factor App principals.

The Twelve Factors

  1. Codebase
    One codebase tracked in revision control, many deploys
    ✅ Yup, GitHub
  2. Dependencies
    Explicitly declare and isolate dependencies
    ✅ Yup, uses requirements.txt
  3. Config
    Store config in the environment
    ✅ Yup, uses .env files
  4. Backing Services
    Treat backing services as attached resources
    ✅ BYOBacking service
  5. Build, release, run
    Strictly separate build and run stages
    ✅ gulp, bin/image, bin/stevedore, bin/deploy
  6. Processes
    Execute the app as one or more stateless processes
    ✅ Thanks Docker!
  7. Port binding
    Export services via port binding
    ✅ 80 & 8010
  8. Concurrency
    Scale out via the process model
    ✅ Keep your sessions in Redis or DB
  9. Disposability
    Maximize robustness with fast startup and graceful shutdown
    ✅ Thank Docker!
  10. Dev/Prod parity
    Keep development, staging, and production as similar as possible
    ✅ Yup
  11. Logs
    Treat logs as event streams
    ✅ Yup
  12. Admin Processes
    Run admin/management tasks as one-off processes
    🚫 Does not Apply

Contents

This repo contains a simple Python Django 1.8 web app as well as the configuration for both Django and NGINX Docker images. There are also some Bash scripts to help automate the build, release and deploy process.

Stack

  • Python 3.4
  • Django 1.8
  • Gunicorn app server
  • Nginx web server
  • Sass css preprocessor
  • Bootstrap 4-alpha CSS framework
  • Gulp build system

Get Started

This document assumes you are running OS X. These are the requirements needed by the bin/install script;

  • Bash
  • XCode & command line utilities
  • Homebrew 0.9+

Additionally these requirements are installed:

These steps will get you running locally:

  1. ./bin/install will provision your local development machine for the first time. It will
  • install all requirements (if they don't exist)
  • creates and starts a Docker virtual machine
  1. Copy environments/dev/.env.example to environments/dev/.env and edit the values. Please make sure to change the following keys:
  • ENV_SECRET_KEY create your own Django secret key
  • ENV_CDN to your Docker host IP: docker-machine ip docker-vm
  • Optionally:
    • ENV_AWS_EB_ENVIRONMENT_NAME to your Amazon AWS Elastic Beanstalk environment name
    • ENV_DOCKER_HUB_REPO_PATH to your Docker repo (Create one if you plan to publish images to Docker Hub.)
  1. Create a dev python environment: pyvenv environments/dev/pyvenv
  2. ./bin/image dev build will create "dev" Docker images with all dependencies installed.
  3. ./bin/stevedore dev start will run the dev Docker containers, open the browser, and tail the logs. At this point you're viewing running source code!
  • ctrl+c stops the logs ./bin/stevedore dev stop will stop the Docker containers.
  • ./bin/stevedore dev logs resumes log tailing.
  1. Optionally, to build frontend assets (CSS, images, etc):
  • Run ./bin/stevedore dev build:dev

You can typically connect to your web application at: http://192.168.99.100/xyzzy.

You should now be up and running. Welcome.

Deployment

Read more about deploying with Amazon AWS Elastic Beanstalk, version numbering, running deployments, hotfix / patch deployments, Docker Hub, and more on the Deployments wiki page.

Testing & Code Quality Tooling

Read more about the set of tools for managing, testing and deploying.

Authors

License

MIT

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].