Demo Django application using docker
The goal of this demo, is to mimic a real life production application where there are multiple parts.
There are 5 parts to this demo app:
- Web container
- Worker container
- Cron container
- redis container
- postgresql container
https://hub.docker.com/r/kencochrane/django-demo/
To get started, you need to do the following.
- install docker-toolbox
https://www.docker.com/products/docker-toolbox
- create a new docker virtual machine called
demo
$ docker-machine create --driver virtualbox demo
- Setup your shell
$ eval "$(docker-machine env demo)"
- Clone this repo somewhere.
$ git clone https://github.com/kencochrane/docker-django-demo.git
- docker compose up the env.
$ docker-compose up -d
- The first time, you need to setup the database, by running this command.
$ docker-compose run web python /home/docker/dockerdemo/manage.py migrate
- Find out the IP, and connect from browser.
$ docker-machine ip demo