• Stars
    star
    471
  • Rank 90,100 (Top 2 %)
  • Language
    Python
  • License
    MIT License
  • Created almost 8 years ago
  • Updated 3 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

A complete docker package for django which is easy to understand and can be deployed anywhere(supports Data Science related libraries like numpy, scipy etc).

Deploy Django using Nginx, Celery, Redis and Postgresql with Docker

A boilerplate to deploy Django with cool stuff. Also serves as an example project from these tutorial:

  1. Deploy Django, Gunicorn, NGINX, Postgresql using Docker
  2. Serve Static Files by Nginx from Django using Docker
  3. Docker: Use Celery in Django(Redis as Broker)

Where it is described how this boilerplate was created from scratch so that you can build your own.

Advantages

  1. Ready to use with your django project.
  2. Combined with NGINX, Redis, Celery to handle relevent things.
  3. Alpine based images are used, so that sizes of the images are compartively low.
  4. Now comes built it with Numpy, Scipy and Pandas support. So you can integrate your datascience projects with this. Instructions for integrating these libraries are also shared in the Dockerfile.
  5. With Numpy, Pandas and Scipy dependecies installed, the total size is 657MB(may differ if you have more packages). Without these, size reduces to 390MB.
  6. Now comes with support to install Pillow using django.

Now Featuring Numpy, Scipy and Pandas

In the Dockerfile, there are detailed instructions on how to install data science dependencies.

PS: Here is a gist which is more useful for Numpy, Pandas, Scipy etc. And it is usable with this project's docker-compose.yml file. Just you need to replace the Dockerfile from ./compose directory with the one in the gist.

Basic Usage

  1. First run make build inside root directory.
  2. Then run make up to start up the project for first time.
  3. Use/update environment variables from .envs folder.

Checkout the commands section for more usage.

Preview

A default Django project resides in src directory. So, when you start the project, you will see the following screen in 8000 port:

Demo One

Also when you access the django container log via make log-web, you will see the following:

Demo Two

Commands

To use this project, run this commands:

  1. make up to build the project and starting containers.
  2. make build to build the project.
  3. make start to start containers if project has been up already.
  4. make stop to stop containers.
  5. make shell-web to shell access web container.
  6. make shell-db to shell access db container.
  7. make shell-nginx to shell access nginx container.
  8. make logs-web to log access web container.
  9. make logs-db to log access db container.
  10. make logs-nginx to log access nginx container.
  11. make collectstatic to put static files in static directory.
  12. make log-web to log access web container.
  13. make log-db to log access db container.
  14. make log-nginx to log access nginx container.
  15. make restart to restart containers.

License

MIT.

Contribute

Feel free to fork and create PR.

More Repositories

1

django-reset-password

This project is an implementation example for reset password of django
JavaScript
22
star
2

openshift-python-pipeline

Modern CI/CD Using Python+Gunicorn+NGINX+Jenkins Pipeline to Openshift
Python
17
star
3

openshift-django

Example for deploying django application using openshift(with pipeline)
Python
10
star
4

django1.7-scrapy1.0.3

An example project built using django 1.7 and scrapy 1.0.3
Python
10
star
5

cloudflare-google-fonts-cache

Use Cloudflare worker cache to serve google fonts.
JavaScript
8
star
6

cefalo-overtime-calculator

For calculating overtime for Cefalo.
Python
6
star
7

django-encrypt-file

A simple package to encrypt Django's uploaded or downloading files
Python
5
star
8

project-capstone-nyc-fights-pandemic

Capstone Project: Find Best Neighborhood to Fight Pandemic in NYC
Jupyter Notebook
2
star
9

myblog

An example project from my tutorial of making a simple blog.
JavaScript
2
star
10

django-passport

JWT based authentication service by Django
Python
2
star
11

Tornado-Mail

A simple RESTful API based email client built using Tornado.
Python
2
star
12

play-with-pillow

Image Processing Services built using Pillow
Python
1
star
13

mysql-python-csv

A simple project to make csv file using MySQL and Python
Python
1
star
14

BlogEngine

My personal blog developed using Django. It will be deployed soon in ruddra.com
CSS
1
star
15

corporate-signup

Python
1
star
16

ruddra.comments

store comments for ruddra.com
1
star
17

alfred-notable-workflow

An alfred workflow which allows you to create new markdown files suitable to use with Notable App.
Python
1
star
18

ruddra.github.io

Personal blog powered by Hugo
HTML
1
star
19

reinforcement-learning-examples

Sample codes for different reinforcement learning methods.
Jupyter Notebook
1
star