mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2025-06-06 14:07:26 -05:00
Development: devcontainer setup, docs and enable dependabot (#10081)
* 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>
This commit is contained in:
parent
9c32d931bc
commit
7c33785c07
@ -83,7 +83,8 @@ RUN set -eux \
|
|||||||
&& apt-get update \
|
&& apt-get update \
|
||||||
&& apt-get install --yes --quiet ${PYTHON_PACKAGES}
|
&& 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 \
|
RUN set -eux \
|
||||||
&& echo "Installing pre-built updates" \
|
&& echo "Installing pre-built updates" \
|
||||||
@ -128,7 +129,6 @@ RUN set -eux \
|
|||||||
&& echo "Configuring ImageMagick" \
|
&& echo "Configuring ImageMagick" \
|
||||||
&& mv paperless-policy.xml /etc/ImageMagick-6/policy.xml
|
&& 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
|
# Packages needed only for building a few quick Python
|
||||||
# dependencies
|
# dependencies
|
||||||
|
@ -47,39 +47,19 @@ To start the DevContainer:
|
|||||||
|
|
||||||
1. Open VSCode.
|
1. Open VSCode.
|
||||||
2. Open the project folder.
|
2. Open the project folder.
|
||||||
3. Open the command palette:
|
3. Open the command palette and choose `Dev Containers: Rebuild and Reopen in Container`.
|
||||||
- **Windows/Linux**: `Ctrl+Shift+P`
|
|
||||||
- **Mac**: `Cmd+Shift+P`
|
|
||||||
4. Type and select `Dev Containers: Rebuild and Reopen in Container`.
|
|
||||||
|
|
||||||
VSCode will build and start the DevContainer environment.
|
VSCode will build and start the DevContainer environment.
|
||||||
|
|
||||||
### Step 2: Initial Setup
|
### 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:
|
1. **Compile Frontend Assets**: `Maintenance: Compile frontend for production`.
|
||||||
- **Windows/Linux**: `Ctrl+Shift+P`
|
2. **Run Database Migrations**: `Maintenance: manage.py migrate`.
|
||||||
- **Mac**: `Cmd+Shift+P`
|
3. **Create Superuser**: `Maintenance: manage.py createsuperuser`.
|
||||||
- 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`.
|
|
||||||
|
|
||||||
### Debugging and Running Services
|
### Debugging and Running Services
|
||||||
|
|
||||||
@ -95,11 +75,8 @@ You can start and debug backend services either as debugging sessions via `launc
|
|||||||
|
|
||||||
#### Using Tasks
|
#### Using Tasks
|
||||||
|
|
||||||
1. Open the command palette:
|
1. Open the command palette and select `Tasks: Run Task`.
|
||||||
- **Windows/Linux**: `Ctrl+Shift+P`
|
2. Choose the desired task:
|
||||||
- **Mac**: `Cmd+Shift+P`
|
|
||||||
2. Select `Tasks: Run Task`.
|
|
||||||
3. Choose the desired task:
|
|
||||||
- `Runserver`
|
- `Runserver`
|
||||||
- `Document Consumer`
|
- `Document Consumer`
|
||||||
- `Celery`
|
- `Celery`
|
||||||
|
@ -156,7 +156,7 @@
|
|||||||
"label": "Maintenance: recreate .venv",
|
"label": "Maintenance: recreate .venv",
|
||||||
"description": "Recreate the python virtual environment and install python dependencies",
|
"description": "Recreate the python virtual environment and install python dependencies",
|
||||||
"type": "shell",
|
"type": "shell",
|
||||||
"command": "rm -R -v .venv/* || uv install --dev",
|
"command": "rm -rf .venv && uv venv && uv sync --dev",
|
||||||
"group": "none",
|
"group": "none",
|
||||||
"presentation": {
|
"presentation": {
|
||||||
"echo": true,
|
"echo": true,
|
||||||
|
4
.github/dependabot.yml
vendored
4
.github/dependabot.yml
vendored
@ -84,7 +84,9 @@ updates:
|
|||||||
- "patch"
|
- "patch"
|
||||||
# Update Dockerfile in root directory
|
# Update Dockerfile in root directory
|
||||||
- package-ecosystem: "docker"
|
- package-ecosystem: "docker"
|
||||||
directory: "/"
|
directories:
|
||||||
|
- "/"
|
||||||
|
- "/.devcontainer/"
|
||||||
schedule:
|
schedule:
|
||||||
interval: "weekly"
|
interval: "weekly"
|
||||||
open-pull-requests-limit: 5
|
open-pull-requests-limit: 5
|
||||||
|
Loading…
x
Reference in New Issue
Block a user