Skip to content

Latest commit

 

History

History
49 lines (40 loc) · 1.69 KB

README.md

File metadata and controls

49 lines (40 loc) · 1.69 KB

Django + Docker quickstart

Django Template - Easy setup for development or production environment with Docker

This initiative is a union of two other projects:

This project contains

One command

Important! Update "myProject" with the name from your project

See the docs about Django templates

PROJECT_NAME=myProject && \
python -m venv .venv && \
source .venv/bin/activate && \
python -m pip install --upgrade pip && \
python -m pip install django
django-admin startproject --template https://github.com/allansbo/django-docker-quickstart/archive/master.zip --name=.env.dev,.env.prod,pytest.ini,docker-compose.prod.yml $PROJECT_NAME . && \
pip install --prefer-binary -r app/requirements-dev.txt && \
git init && \
git add . && \
git commit -m 'Initial import'

Important! Update the .env files with your settings

Development

Uses the default Django development server.

docker-compose -f docker-compose.dev.yml up -d --build

Production

Uses gunicorn + nginx.

docker-compose -f docker-compose.prod.yml up -d --build