Skip to content

Latest commit

 

History

History
51 lines (40 loc) · 1.74 KB

README.md

File metadata and controls

51 lines (40 loc) · 1.74 KB

Deployment Docker of Django, PostgreSQL database, NginX, Gunicorn

This is a Docker setup for deploying your web application based on Django. It also contains tox file for testing your app.

Requirements

You need to install Docker and Docker-Compose.

Production checklist

make sure your django app is configures for production use using this link.

Build

docker-compose build or make build.

Django models in database

docker-compose run --rm djangoapp /bin/bash -c 'cd webapp; ./manage.py makemigrations'.

Migrate database

docker-compose run --rm djangoapp /bin/bash -c 'cd webapp; ./manage.py migrate'.

Run

docker-compose up or make run.

Tests

  • make checksafety
  • make checkstyle
  • make test
  • make coverage

Reference

Example using Docker, Django, multiple Postgres databases, NginX, Gunicorn, pipenv, GitLab CI and tox

License

Software licensed under the ISC license.