django docker starter

Quickly set up a Django project with a MySql database in Docker with a debugger attached in Visual Studio Code.

Steps to run on your local machine

*Requirements

  • Docker installed

1. Run docker-compose up -d --build

2. Go to http://localhost:7000/ to view your Django application
(https is not supported we expect you to use a proxyserver with a loadbalancer in production anyway)

2.1 this api supports swagger & redoc (http://localhost:7000/api/redoc/)

3. Start developing

3.1 Start Run and Debug in Visual Studio Code for setting breakpoints

Package Manager

This project uses pipenv (pip install pipenv) for managing dependencies

To install a dependency run "pipenv install "

To update django to the latest version run "pipenv update django"

Add app to project

Dependecies for MySql run inside the docker container

To add a project you have to use the shell inside the container "docker exec -it /bin/bash"/p>

Create a folder inside src/apps/ and run "python manage.py startapp src/apps/"