diff --git a/docs/assets/screenshots/devcontainer_environement_ready.png b/docs/assets/screenshots/devcontainer_environement_ready.png new file mode 100644 index 000000000..6e2f2c08e Binary files /dev/null and b/docs/assets/screenshots/devcontainer_environement_ready.png differ diff --git a/docs/assets/screenshots/devcontainer_run_debug.png b/docs/assets/screenshots/devcontainer_run_debug.png new file mode 100644 index 000000000..fbb4863b9 Binary files /dev/null and b/docs/assets/screenshots/devcontainer_run_debug.png differ diff --git a/docs/assets/screenshots/vscode_prompt_devcontainer.png b/docs/assets/screenshots/vscode_prompt_devcontainer.png new file mode 100644 index 000000000..4d7c9d479 Binary files /dev/null and b/docs/assets/screenshots/vscode_prompt_devcontainer.png differ diff --git a/docs/development.md b/docs/development.md index 44a2f6986..1928e5a1e 100644 --- a/docs/development.md +++ b/docs/development.md @@ -450,3 +450,66 @@ def myparser_consumer_declaration(sender, **kwargs): mime types have many extensions associated with them and the Python methods responsible for guessing the extension do not always return the same value. + +## Easy startup with devcontainers + +The easiest way to get started with development is to use Visual Studio Code with devcontainers.
+This approach will create a preconfigured development environment with all the tools you need.
+[Learn more about devcontainers](https://code.visualstudio.com/docs/devcontainers/containers) + +### Prerequisites + +[Docker Desktop](https://docs.docker.com/get-docker/)
+[Visual Studio code](https://code.visualstudio.com/)
+ +### Getting started: + +#### 1) Clone the repository on your machine + +#### 2) Open the paperless-ngx folder in Visual Studio Code + +#### 3) Visual Studio Code will prompt you with "Reopen in container" + +![alt text](assets/screenshots/vscode_prompt_devcontainer.png){: style="width:32%"} + +#### 4) Wait for the dev environment to spinn up + +![alt text](assets/screenshots/devcontainer_environement_ready.png){: style="width:32%"} + +#### 5) You have to run the task for the project initialisation + +Run Task labeled: **Project Setup: Run all Init Tasks** + +> Open the 'Run Task' menu in Visual Studio Code: +> Open via menu +> +> Terminal -> Run Task + +> Open via keyboard shortcut +> +> - Mac: **Shift+Command+T** +> - Windows/Linux: **Ctrl+Shift+T** + +This task will: + +- initialise the database tables +- create the superuser for paperless + + > you will be prompted to create the superuser for paperless + +- compile the front end for production + > this is necessary if run run only the backend server in order to have a front end application + +#### 6) Now the project is ready for debugging + +- Set your breakpoints + +- Start either run the fullstack debug or individual debug processes + + ![alt text](assets/screenshots/devcontainer_run_debug.png){: style="width:32%"} + +> note that the debug option **Chrome: Debug Angular Frontend** is a 2 step process. +> +> first it starts task labeled **Start: Frontend Angular** and when angular is ready it will open a chrome browser for debugging + +**Note**: If you only want to spinn up the whole project without debugging you can run the task labeled **Project Start: Run all Services**