Skip to content

Easy setup for development(default django) or production(gunicorn and nginx) environment with docker

License

Notifications You must be signed in to change notification settings

allansbo/django-docker-quickstart

Repository files navigation

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

About

Easy setup for development(default django) or production(gunicorn and nginx) environment with docker

Topics

Resources

License

Stars

Watchers

Forks