- install VScode
- install docker desktop
- clone the repository
- run
docker-compose up -d
, that's it!
- open your browser and visit
http://localhost:8000
- admin console
http://localhost:8000/admin
- exam container log
docker logs -f djdba_web_1
- Django 3.0 listen on port
8000
localhost - MySQL 8.0.19 listen on port
13306
localhost, user/pass = mydjangoapp
you donot need to do anything cuz gunicorn will reload automatically in case of code change
Use mysql workbanch or something simular
docker exec -it djdba_web_1 python manage.py makemigrations
docker exec -it djdba_web_1 python manage.py migrate
docker exec -it djdba_web_1 bash
- Edit
docker-compose.yml
file in the root project folder - Rebuild db container:
docker-compose up --build -d db
- Rebuild web container:
docker-compose up --build -d web
or, you may try a CLEAN start as
- stop docker compose:
$ docker-compose down
- remove ALL container and images:
$ docker system prune -a
- start docker compose:
$ docker-compose up -d
https://developer.mozilla.org/en-US/docs/Learn/Server-side/Django