Testing deployment of a django app as dockers (django+gunicorn+nginx+postgresql). Based on post at https://blog.bitsacm.in/django-on-docker/
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
The Dod e34e135a84 Use cloud db (and optional S3) 4 days ago
djangoproject Use cloud db (and optional S3) 4 days ago
nginx Initial commit 1 week ago
screenshots README edit and screenshots 6 days ago
.gitignore Use cloud db (and optional S3) 4 days ago
README.md README edit and screenshots 6 days ago
dev.env Use cloud db (and optional S3) 4 days ago
docker-compose.yml Use cloud db (and optional S3) 4 days ago
project.env.example Use cloud db (and optional S3) 4 days ago

README.md

Based on example at https://blog.bitsacm.in/django-on-docker/ (django+gunicorn+nginx+postgresql on docker)

To install local dev server (sqlite3, and DEBUG):

  • virtualenv -p python3 venv
  • . venv/bin/activate
  • pip install -r djangoproject/requirements.txt

To run local dev server

  • First time in a shell, run . venv/bin/activate, and . dev.env
  • cd djangoproject
  • Perform first time operations (see below)
  • ./manage.py runserver and browse to http://localhost:8000

To deploy dockers locally

  • You should copy project.env.example to project.env and edit it.
  • docker-compose up would then run the server on http://localhost:8888
  • docker exec -it django /bin/bash will let you perform first time operations (see below)

First time operations

Whether on local dev server or on a docker, you should do 2 things:

  • ./manage.py createsuperuser (so that you can manage the site via web)
  • ./manage.py loaddata billboard/fixtures/initial-data.json (Optional. Populates the db with a few items)

Screenshots

App

Admin