Docker Django 范例

PreRequirements

Build docker

1
docker-compose build

Run docker

1
2
docker-compose up -d
docker exec -i docker_django_demo_web_1 bash -c 'python manage.py collectstatic'

Stop & remove docker

1
2
docker-compose stop
docker-compose rm -f

Visit your site

http://localhost:8080/