mirror of
https://github.com/sissbruecker/linkding.git
synced 2025-11-17 11:34:03 +01:00
Fix devcontainer (#1208)
* Update Python version to 3.13 in devcontainer * Update `postCreateCommand` to install and use uv * Update DevContainers paragraph in README with uv commands * Update commands --------- Co-authored-by: Sascha Ißbrücker <sascha.issbruecker@googlemail.com>
This commit is contained in:
@@ -2,7 +2,7 @@
|
|||||||
// README at: https://github.com/devcontainers/templates/tree/main/src/python
|
// README at: https://github.com/devcontainers/templates/tree/main/src/python
|
||||||
{
|
{
|
||||||
"name": "Python 3",
|
"name": "Python 3",
|
||||||
"image": "mcr.microsoft.com/devcontainers/python:3.12",
|
"image": "mcr.microsoft.com/devcontainers/python:3.13",
|
||||||
"features": {
|
"features": {
|
||||||
"ghcr.io/devcontainers/features/node:1": {}
|
"ghcr.io/devcontainers/features/node:1": {}
|
||||||
},
|
},
|
||||||
@@ -14,7 +14,7 @@
|
|||||||
"forwardPorts": [8000],
|
"forwardPorts": [8000],
|
||||||
|
|
||||||
// Use 'postCreateCommand' to run commands after the container is created.
|
// Use 'postCreateCommand' to run commands after the container is created.
|
||||||
"postCreateCommand": "pip3 install --user -r requirements.txt -r requirements.dev.txt && npm install && mkdir -p data && python3 manage.py migrate",
|
"postCreateCommand": "pip install uv && uv sync --group dev && npm install && mkdir -p data && uv run manage.py migrate",
|
||||||
|
|
||||||
// Configure tool-specific properties.
|
// Configure tool-specific properties.
|
||||||
"customizations": {
|
"customizations": {
|
||||||
|
|||||||
11
README.md
11
README.md
@@ -105,25 +105,20 @@ make format
|
|||||||
|
|
||||||
### DevContainers
|
### DevContainers
|
||||||
|
|
||||||
> [!WARNING]
|
|
||||||
> The dev container setup is currently broken after switching to uv.
|
|
||||||
> Feel free to contribute a PR if you want to fix it.
|
|
||||||
> The instructions below are outdated until then.
|
|
||||||
|
|
||||||
This repository also supports DevContainers: [](https://vscode.dev/redirect?url=vscode://ms-vscode-remote.remote-containers/cloneInVolume?url=https://github.com/sissbruecker/linkding.git)
|
This repository also supports DevContainers: [](https://vscode.dev/redirect?url=vscode://ms-vscode-remote.remote-containers/cloneInVolume?url=https://github.com/sissbruecker/linkding.git)
|
||||||
|
|
||||||
Once checked out, only the following commands are required to get started:
|
Once checked out, only the following commands are required to get started:
|
||||||
|
|
||||||
Create a user for the frontend:
|
Create a user for the frontend:
|
||||||
```
|
```
|
||||||
python3 manage.py createsuperuser --username=joe --email=joe@example.com
|
uv run manage.py createsuperuser --username=joe --email=joe@example.com
|
||||||
```
|
```
|
||||||
Start the Node.js development server (used for compiling JavaScript components like tag auto-completion) with:
|
Start the Node.js development server (used for compiling JavaScript components like tag auto-completion) with:
|
||||||
```
|
```
|
||||||
npm run dev
|
make frontend
|
||||||
```
|
```
|
||||||
Start the Django development server with:
|
Start the Django development server with:
|
||||||
```
|
```
|
||||||
python3 manage.py runserver
|
make serve
|
||||||
```
|
```
|
||||||
The frontend is now available under http://localhost:8000
|
The frontend is now available under http://localhost:8000
|
||||||
|
|||||||
Reference in New Issue
Block a user