5 Quick Tips - Django + Docker

James Pacileo @ignighted

Tip 1 - Environment Variables

  • 12factor URLs
    • databases
    • mqs
    • keystores
    • memcached
    • ...
  • CREDENTIALS / API KEYS
  • FOLDERS
  •  

Tip 2 - Volumes

  • Media Upload
  • Log folders
  • Database data directory
  • SSL certificates
  •  

Tip 3 - Use Higher Level Tools

Other tools    

  • Deis
  • Dokku
  • Kubernetes
  • Flynn
  • ...

docker-compose

Qucik & Simple

Tip 4 

Cache PIP Requirements!

ADD ./requirements /home/docker/requirements
RUN pip install -r /home/docker/requirements/production.txt

ADD . /home/docker/code

Tip 5 - "run container bash"

docker-compose run django_app bash

That was quick!

Enough time for...

BONUS TIPS???

Tip 6 - Local hostnames

 

Made with Slides.com