Giter Site home page Giter Site logo

clover's Introduction

Django Boilerplate

Build Status

This is an example of a simple boilerplate of a dockerized django project using celery and rabbitmq for managing tasks.
There's also a premade example of an async task.

It also includes:

  • Bootstrap 4.0.0 - w/ jquery & popperjs
  • Postgresql DB

Bootstrap

To use this project as a template, start your new project using:

django-admin startproject myproject --extension py,yml,json --name README.md --template https://github.com/AbelHristodor/django-boilerplate/archive/master.zip

Or you can pull the repository and then remane the project:

python manage.py rename yourprojectname

Installation Guide:

Firstly install docker and docker compose. Check https://docs.docker.com/compose/install/ for docker-compose and https://docs.docker.com/install/ for docker.

Git clone the project in a folder and then create a .env file and paste the following inside:

# Database credentials

DATABASE_HOST=postgres
DATABASE_NAME=postgres
DATABASE_USER=postgres
DATABASE_PASSWORD=postgres

# Memcached host
MEMCACHED_HOST=memcached

Then go to the base directory and run:
docker-compose up --build

Once finished, while the app is running, open another terminal and migrate the app using:
docker-compose run --rm web scripts/migrate_loaddata.sh

The app will be running at: http://localhost:8000/

App management

  • To start the app use docker-compose up
  • To stop the app use docker-compose down

If you can't run those command without sudo see: Docker-docs-for-linux or Stackoverflow-fix

Thanks to @Silvian for helping me :))

clover's People

Contributors

baziovvipp avatar

Watchers

Bazio DEV 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.