https://github.com/smoke-trees/django-template
An opinionated template for quickly getting started with a django webapp
https://github.com/smoke-trees/django-template
django django-rest-framework docker docker-compose nginx openapi rest-api swagger template
Last synced: about 1 month ago
JSON representation
An opinionated template for quickly getting started with a django webapp
- Host: GitHub
- URL: https://github.com/smoke-trees/django-template
- Owner: smoke-trees
- Created: 2020-11-05T09:59:43.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2020-11-21T16:13:14.000Z (over 4 years ago)
- Last Synced: 2025-01-23T06:09:01.687Z (3 months ago)
- Topics: django, django-rest-framework, docker, docker-compose, nginx, openapi, rest-api, swagger, template
- Language: Python
- Homepage:
- Size: 63.5 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Django template
An opinionated template for quickly bootstrapping a django project using postgres, docker and nginx.## Features
- [x] Everything Django offers OOTB
- [x] CORS support
- [x] Autogenerated OpenAPI and ReDoc API documentation
- [x] Production deployment using docker-compose
- [x] SSL using Nginx and LetsEncrypt
## Instructions to run
### Pre-requisites:
- [Python 3.7 and above](https://www.python.org/downloads/)
- [Poetry](https://python-poetry.org/)
- [Docker](https://docs.docker.com/engine/install/)
- [docker-compose](https://docs.docker.com/compose/install/)
### Installing dependencies
```bash
poetry shell # sets up and activates a venv
poetry install # installs missing dependencies from the lockfile
```### Run migrations
```bash
python manage.py makemigrations
python manage.py migrate
```### Start the server
In debug
```bash
python manage.py runserver
```In production
```bash
docker-compose up -d --build
```## More info
This template comes with an already existing model. Feel free to modify or remove it.API docs can be found at:
- http://localhost:8000/docs (OpenAPI 3)
- http://localhost:8000/redoc (ReDoc)