mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2025-03-31 13:35:08 -05:00
224 lines
5.6 KiB
JSON
224 lines
5.6 KiB
JSON
{
|
|
"version": "2.0.0",
|
|
"tasks": [
|
|
{
|
|
"label": "Start: Celery Worker",
|
|
"description": "Start the Celery Worker which processes background and consume tasks",
|
|
"type": "shell",
|
|
"command": "uv run celery --app paperless worker -l DEBUG",
|
|
"isBackground": true,
|
|
"options": {
|
|
"cwd": "${workspaceFolder}/src"
|
|
},
|
|
"problemMatcher": [
|
|
{
|
|
"owner": "custom",
|
|
"pattern": [
|
|
{
|
|
"regexp": ".",
|
|
"file": 1,
|
|
"location": 2,
|
|
"message": 3
|
|
}
|
|
],
|
|
"background": {
|
|
"activeOnStart": true,
|
|
"beginsPattern": "celery.*",
|
|
"endsPattern": "ready"
|
|
}
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"label": "Start: Frontend Angular",
|
|
"description": "Start the Frontend Angular Dev Server",
|
|
"type": "shell",
|
|
"command": "npm start",
|
|
"isBackground": true,
|
|
"options": {
|
|
"cwd": "${workspaceFolder}/src-ui"
|
|
},
|
|
"problemMatcher": [
|
|
{
|
|
"owner": "custom",
|
|
"pattern": [
|
|
{
|
|
"regexp": ".",
|
|
"file": 1,
|
|
"location": 2,
|
|
"message": 3
|
|
}
|
|
],
|
|
"background": {
|
|
"activeOnStart": true,
|
|
"beginsPattern": ".*",
|
|
"endsPattern": "Compiled successfully"
|
|
}
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"label": "Start: Consumer Service (manage.py document_consumer)",
|
|
"description": "Start the Consumer Service which processes files from a directory",
|
|
"type": "shell",
|
|
"command": "uv run python manage.py document_consumer",
|
|
"group": "build",
|
|
"presentation": {
|
|
"echo": true,
|
|
"reveal": "always",
|
|
"focus": false,
|
|
"panel": "shared",
|
|
"showReuseMessage": false,
|
|
"clear": true,
|
|
"revealProblems": "onProblem"
|
|
},
|
|
"options": {
|
|
"cwd": "${workspaceFolder}/src"
|
|
}
|
|
},
|
|
{
|
|
"label": "Start: Backend Server (manage.py runserver)",
|
|
"description": "Start the Backend Server which serves the Django API and the compiled Angular frontend",
|
|
"type": "shell",
|
|
"command": "uv run python manage.py runserver",
|
|
"group": "build",
|
|
"presentation": {
|
|
"echo": true,
|
|
"reveal": "always",
|
|
"focus": false,
|
|
"panel": "shared",
|
|
"showReuseMessage": false,
|
|
"clear": true,
|
|
"revealProblems": "onProblem"
|
|
},
|
|
"options": {
|
|
"cwd": "${workspaceFolder}/src"
|
|
}
|
|
},
|
|
{
|
|
"label": "Maintenance: manage.py migrate",
|
|
"description": "Apply database migrations",
|
|
"type": "shell",
|
|
"command": "uv run python manage.py migrate",
|
|
"group": "none",
|
|
"presentation": {
|
|
"echo": true,
|
|
"reveal": "always",
|
|
"focus": true,
|
|
"panel": "shared",
|
|
"showReuseMessage": false,
|
|
"clear": true,
|
|
"revealProblems": "onProblem"
|
|
},
|
|
"options": {
|
|
"cwd": "${workspaceFolder}/src"
|
|
}
|
|
},
|
|
{
|
|
"label": "Maintenance: Build Documentation",
|
|
"description": "Build the documentation with MkDocs",
|
|
"type": "shell",
|
|
"command": "uv run mkdocs build --config-file mkdocs.yml && uv run mkdocs serve",
|
|
"group": "none",
|
|
"presentation": {
|
|
"echo": true,
|
|
"reveal": "always",
|
|
"focus": true,
|
|
"panel": "shared",
|
|
"showReuseMessage": false,
|
|
"clear": true,
|
|
"revealProblems": "onProblem"
|
|
},
|
|
"options": {
|
|
"cwd": "${workspaceFolder}"
|
|
}
|
|
},
|
|
{
|
|
"label": "Maintenance: manage.py createsuperuser",
|
|
"description": "Create a superuser",
|
|
"type": "shell",
|
|
"command": "uv run python manage.py createsuperuser",
|
|
"group": "none",
|
|
"presentation": {
|
|
"echo": true,
|
|
"reveal": "always",
|
|
"focus": true,
|
|
"panel": "shared",
|
|
"showReuseMessage": false,
|
|
"clear": true,
|
|
"revealProblems": "onProblem"
|
|
},
|
|
"options": {
|
|
"cwd": "${workspaceFolder}/src"
|
|
}
|
|
},
|
|
{
|
|
"label": "Maintenance: recreate .venv",
|
|
"description": "Recreate the python virtual environment and install python dependencies",
|
|
"type": "shell",
|
|
"command": "rm -R -v .venv/* || uv install --dev",
|
|
"group": "none",
|
|
"presentation": {
|
|
"echo": true,
|
|
"reveal": "always",
|
|
"focus": true,
|
|
"panel": "shared",
|
|
"showReuseMessage": false,
|
|
"clear": true,
|
|
"revealProblems": "onProblem"
|
|
},
|
|
"options": {
|
|
"cwd": "${workspaceFolder}"
|
|
}
|
|
},
|
|
{
|
|
"label": "Maintenance: Install Frontend Dependencies",
|
|
"description": "Install frontend (npm) dependencies",
|
|
"type": "npm",
|
|
"script": "install",
|
|
"path": "src-ui",
|
|
"group": "clean",
|
|
"problemMatcher": [],
|
|
"detail": "install dependencies from package"
|
|
},
|
|
{
|
|
"description": "Clean install frontend dependencies and build the frontend for production",
|
|
"label": "Maintenance: Compile frontend for production",
|
|
"type": "shell",
|
|
"command": "npm ci && ./node_modules/.bin/ng build --configuration production",
|
|
"group": "none",
|
|
"presentation": {
|
|
"echo": true,
|
|
"reveal": "always",
|
|
"focus": true,
|
|
"panel": "shared",
|
|
"showReuseMessage": false,
|
|
"clear": true,
|
|
"revealProblems": "onProblem"
|
|
},
|
|
"options": {
|
|
"cwd": "${workspaceFolder}/src-ui"
|
|
}
|
|
},
|
|
{
|
|
"label": "Project Setup: Run all Init Tasks",
|
|
"description": "Runs all init tasks to setup the project including migrate the database, create a superuser and compile the frontend for production",
|
|
"dependsOrder": "sequence",
|
|
"dependsOn": [
|
|
"Maintenance: manage.py migrate",
|
|
"Maintenance: manage.py createsuperuser",
|
|
"Maintenance: Compile frontend for production"
|
|
]
|
|
},
|
|
{
|
|
"label": "Project Start: Run all Services",
|
|
"description": "Runs all services required to start the project including the Celery Worker, the Consumer Service and the Backend Server",
|
|
"dependsOn": [
|
|
"Start: Celery Worker",
|
|
"Start: Consumer Service (manage.py document_consumer)",
|
|
"Start: Backend Server (manage.py runserver)"
|
|
]
|
|
}
|
|
]
|
|
}
|