- Install
ms-vscode-remote.remote-containers
extension - Start Docker and open project's dir in VSCode
- Create
.env
file from.env.example
cp .env.example .env
Ctrl+Shift+P
-> Remote-Containers: Reopen in Container- You can run a debugger using F5 key or just run the app using VSCode's integrated terminal:
./manage.py runserver
- If you change anything in models run
python manage.py makemigrations
- To apply migrations to the database run
python manage.py migrate
You can install python dependencies inside the container using pip in the integrated terminal. If you want dependencies to be persisted in the repository you have to add them to requirements.txt
or requirements-dev.txt
file. The first one contains project specific dependecies and the second file should contain dev environment specific ones. After each change of these two files the container should be rebuilt using docker-compose build
command to apply changes.