- Activate the virtual envirnoment
source your-env/bin/activate
- Install the requirements
pip freeze -r requirements.txt
- Migrate the migrations by running this command
python manage.py migrate
- Run app
python manage.py runserver
- Build image
docker build -t my-django-app .
It takes some time.
- Run cmd
docker run -p 8000:8000 my-django-app
Then you can paste the http://127.0.0.1:8000/ on browser
Note: Before running with docker you need to run the migrations