Coder Social home page Coder Social logo

django_docker's Introduction

Dockerfile for Djnago with gunicorn, postgres and nginx


Layout

layout

nginx:

nginx-layout

nginx.conf has all the settings eg to connect to django app, serve static and media files. The Dockerfile removes default.conf from /etc/nginx/conf.d/ in the nginx container and replace nginx.conf in /etc/nginx/ with our /nginx/nginx.conf from the repo.

static and media:

Our django related stuffs

Env Files

  1. .env.dev: It has SECRET_KEY, DEBUG=1 for development mode, and POSTGRES settings.

  2. .env.prod: Same settings just DEBUG=0

  3. .env.prod.db: DB settings to be used in docker-compose.prod.yml for production env.

NOTE: In .env.dev stick to POSTGRES_HOST=db as it is, rest you can change as desired or required.


Docker and docker-compose files:

  1. Dockerfile works in conjuncture docker-compose.yml
  2. Dockerfile.prod works in conjuncture docker-compose.prod.yml

django_docker's People

Contributors

dependabot[bot] avatar noobextendsbot avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.