Git Product home page Git Product logo

django-micro's Introduction

Django micro setup

What is this repository for?

This is a sample template to use when scaffolding a django project to be used as a microservice.

It disables a lot of the default settings provided by django by default and provides multiple settings to choose between

Configuration

The bare minimum dependency to get the app to production is what is introduced. to install, run pip install -r requirements/local.txt

$ mkdir project_location
$ python -m venv venv
$ source venv/Scripts/activate # on linux/mac venv/bin/activate
$ pip install -r requirements/local.txt
$ django-admin startproject --template=https://github.com/gbozee/django-micro/archive/master.zip --name=Dockerfile  <project_name>

Database configuration

The project makes use of environment variables which is a good way to switch configuration at runtime. The following are the variable supported

DATABASE_URL: a url connection string of the database

DJANGO_SETTINGS_MODULE: settings module to load the django app in default is <project_name>.settings.local

Running Tests

To run tests, python manage.py test <project_name>

Preparing for deployments

There is a dockerfile created by default to help deploy the app as a docker-container. To build the docker container run the following command docker build -t=<container_name> .

django-micro's People

Contributors

204070 avatar gbozee avatar

Watchers

James Cloos avatar  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.