]> git.ipfire.org Git - thirdparty/paperless-ngx.git/commitdiff
Development: devcontainer setup, docs and enable dependabot (#10081)
authorsidey79 <7968127+sidey79@users.noreply.github.com>
Sun, 1 Jun 2025 17:59:46 +0000 (19:59 +0200)
committerGitHub <noreply@github.com>
Sun, 1 Jun 2025 17:59:46 +0000 (17:59 +0000)
* fix: container setup and task description

* feat: enable dependabot for devcontainer

* fix: dont install latest uv and dont install uvx

* Cleanup decontainer readme

* Fix the reset venv command

---------

Co-authored-by: shamoon <4887959+shamoon@users.noreply.github.com>
.devcontainer/Dockerfile
.devcontainer/README.md
.devcontainer/vscode/tasks.json
.github/dependabot.yml

index d252f32ccdb52fd195fd8f05a4eb5947ec6df8fd..fd6448e9b6e15203a34ffb96e37b1f84c494aa2a 100644 (file)
@@ -83,7 +83,8 @@ RUN set -eux \
     && apt-get update \
     && apt-get install --yes --quiet ${PYTHON_PACKAGES}
 
-COPY --from=ghcr.io/astral-sh/uv:0.6 /uv /bin/uv
+COPY --from=ghcr.io/astral-sh/uv:0.7.8 /uv /bin/uv
+
 
 RUN set -eux \
   && echo "Installing pre-built updates" \
@@ -128,7 +129,6 @@ RUN set -eux \
   && echo "Configuring ImageMagick" \
     && mv paperless-policy.xml /etc/ImageMagick-6/policy.xml
 
-COPY --from=ghcr.io/astral-sh/uv:0.6 /uv /bin/uv
 
 # Packages needed only for building a few quick Python
 # dependencies
index a5c615e0aaec21e2a6fb78d7642643d72e152e99..cec62c802b13337064546aafb4665d5bed23ddb0 100644 (file)
@@ -47,39 +47,19 @@ To start the DevContainer:
 
 1. Open VSCode.
 2. Open the project folder.
-3. Open the command palette:
-   - **Windows/Linux**: `Ctrl+Shift+P`
-   - **Mac**: `Cmd+Shift+P`
-4. Type and select `Dev Containers: Rebuild and Reopen in Container`.
+3. Open the command palette and choose `Dev Containers: Rebuild and Reopen in Container`.
 
 VSCode will build and start the DevContainer environment.
 
 ### Step 2: Initial Setup
 
-Once the DevContainer is up and running, perform the following steps:
+Once the DevContainer is up and running, run the `Project Setup: Run all Init Tasks` task to initialize the project.
 
-1. **Compile Frontend Assets**:
+Alternatively, the Project Setup can be done with individual tasks:
 
-   - Open the command palette:
-     - **Windows/Linux**: `Ctrl+Shift+P`
-     - **Mac**: `Cmd+Shift+P`
-   - Select `Tasks: Run Task`.
-   - Choose `Frontend Compile`.
-
-2. **Run Database Migrations**:
-
-   - Open the command palette:
-     - **Windows/Linux**: `Ctrl+Shift+P`
-     - **Mac**: `Cmd+Shift+P`
-   - Select `Tasks: Run Task`.
-   - Choose `Migrate Database`.
-
-3. **Create Superuser**:
-   - Open the command palette:
-     - **Windows/Linux**: `Ctrl+Shift+P`
-     - **Mac**: `Cmd+Shift+P`
-   - Select `Tasks: Run Task`.
-   - Choose `Create Superuser`.
+1. **Compile Frontend Assets**: `Maintenance: Compile frontend for production`.
+2. **Run Database Migrations**: `Maintenance: manage.py migrate`.
+3. **Create Superuser**: `Maintenance: manage.py createsuperuser`.
 
 ### Debugging and Running Services
 
@@ -95,11 +75,8 @@ You can start and debug backend services either as debugging sessions via `launc
 
 #### Using Tasks
 
-1. Open the command palette:
-   - **Windows/Linux**: `Ctrl+Shift+P`
-   - **Mac**: `Cmd+Shift+P`
-2. Select `Tasks: Run Task`.
-3. Choose the desired task:
+1. Open the command palette and select `Tasks: Run Task`.
+2. Choose the desired task:
    - `Runserver`
    - `Document Consumer`
    - `Celery`
index 2fe1b6af48c66c1b75d8a88fe6b7b74f887e3386..6475e14d1dd4616e84adeed7c1b809df67f2fd3d 100644 (file)
                        "label": "Maintenance: recreate .venv",
                        "description": "Recreate the python virtual environment and install python dependencies",
                        "type": "shell",
-                       "command": "rm -R -v .venv/* || uv install --dev",
+                       "command": "rm -rf .venv && uv venv && uv sync --dev",
                        "group": "none",
                        "presentation": {
                                "echo": true,
index 829de96740f135b0f1b11ecf32a6bce00955754b..194f54a4a3528758375d3fe159bc863da365f0d2 100644 (file)
@@ -84,7 +84,9 @@ updates:
           - "patch"
   # Update Dockerfile in root directory
   - package-ecosystem: "docker"
-    directory: "/"
+    directories:
+      - "/"
+      - "/.devcontainer/"
     schedule:
       interval: "weekly"
     open-pull-requests-limit: 5