feat: add VS Code Compose tasks for local full-stack testing

Adds Compose: Build & Up, Up, Down, Logs tasks for both Windows and Linux,
allowing the complete app to be tested locally via docker-compose on port 8080.
Updates README task table to reflect all available tasks.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-04-10 13:14:22 +02:00
parent e6b64e3344
commit 8138abad4e
2 changed files with 151 additions and 1 deletions

144
.vscode/tasks.json vendored
View File

@@ -151,6 +151,150 @@
"group": "build",
"presentation": { "reveal": "always", "panel": "shared" },
"problemMatcher": ["$tsc"]
},
// ── Compose: Build (local test image) ──────────────────────────────────────
{
"label": "Compose: Build (Windows)",
"type": "shell",
"windows": {
"command": "docker compose -f docker/docker-compose.yml build"
},
"group": "build",
"presentation": { "reveal": "always", "panel": "shared" },
"problemMatcher": []
},
{
"label": "Compose: Build (Linux)",
"type": "shell",
"linux": {
"command": "docker compose -f docker/docker-compose.yml build"
},
"group": "build",
"presentation": { "reveal": "always", "panel": "shared" },
"problemMatcher": []
},
// ── Compose: Up ────────────────────────────────────────────────────────────
{
"label": "Compose: Up (Windows)",
"type": "shell",
"windows": {
"command": "docker compose -f docker/docker-compose.yml up"
},
"group": "test",
"isBackground": true,
"presentation": { "reveal": "always", "panel": "dedicated" },
"problemMatcher": {
"pattern": { "regexp": ".", "file": 1, "line": 2, "message": 3 },
"background": {
"activeOnStart": true,
"beginsPattern": "Starting",
"endsPattern": "Archivum listening"
}
}
},
{
"label": "Compose: Up (Linux)",
"type": "shell",
"linux": {
"command": "docker compose -f docker/docker-compose.yml up"
},
"group": "test",
"isBackground": true,
"presentation": { "reveal": "always", "panel": "dedicated" },
"problemMatcher": {
"pattern": { "regexp": ".", "file": 1, "line": 2, "message": 3 },
"background": {
"activeOnStart": true,
"beginsPattern": "Starting",
"endsPattern": "Archivum listening"
}
}
},
// ── Compose: Down ──────────────────────────────────────────────────────────
{
"label": "Compose: Down (Windows)",
"type": "shell",
"windows": {
"command": "docker compose -f docker/docker-compose.yml down"
},
"group": "test",
"presentation": { "reveal": "always", "panel": "shared" },
"problemMatcher": []
},
{
"label": "Compose: Down (Linux)",
"type": "shell",
"linux": {
"command": "docker compose -f docker/docker-compose.yml down"
},
"group": "test",
"presentation": { "reveal": "always", "panel": "shared" },
"problemMatcher": []
},
// ── Compose: Build & Up (one-shot local test) ──────────────────────────────
{
"label": "Compose: Build & Up (Windows)",
"type": "shell",
"windows": {
"command": "docker compose -f docker/docker-compose.yml up --build"
},
"group": "test",
"isBackground": true,
"presentation": { "reveal": "always", "panel": "dedicated" },
"problemMatcher": {
"pattern": { "regexp": ".", "file": 1, "line": 2, "message": 3 },
"background": {
"activeOnStart": true,
"beginsPattern": "Building",
"endsPattern": "Archivum listening"
}
}
},
{
"label": "Compose: Build & Up (Linux)",
"type": "shell",
"linux": {
"command": "docker compose -f docker/docker-compose.yml up --build"
},
"group": "test",
"isBackground": true,
"presentation": { "reveal": "always", "panel": "dedicated" },
"problemMatcher": {
"pattern": { "regexp": ".", "file": 1, "line": 2, "message": 3 },
"background": {
"activeOnStart": true,
"beginsPattern": "Building",
"endsPattern": "Archivum listening"
}
}
},
// ── Compose: Logs ──────────────────────────────────────────────────────────
{
"label": "Compose: Logs (Windows)",
"type": "shell",
"windows": {
"command": "docker compose -f docker/docker-compose.yml logs -f"
},
"group": "test",
"isBackground": true,
"presentation": { "reveal": "always", "panel": "dedicated" },
"problemMatcher": []
},
{
"label": "Compose: Logs (Linux)",
"type": "shell",
"linux": {
"command": "docker compose -f docker/docker-compose.yml logs -f"
},
"group": "test",
"isBackground": true,
"presentation": { "reveal": "always", "panel": "dedicated" },
"problemMatcher": []
}
]

View File

@@ -121,11 +121,17 @@ Open the Command Palette (`Ctrl+Shift+P`) → **Tasks: Run Task**:
| Task | Platform | Description |
|---|---|---|
| `Docker: Build` | Windows / Linux | Build multi-arch image |
| `Compose: Build & Up` | Windows / Linux | Build image and start the full stack locally (`http://localhost:8080`) |
| `Compose: Up` | Windows / Linux | Start with the last-built image |
| `Compose: Down` | Windows / Linux | Stop and remove containers |
| `Compose: Logs` | Windows / Linux | Follow container output |
| `Docker: Build` | Windows / Linux | Build registry image |
| `Docker: Push` | Windows / Linux | Push to `192.168.0.19:5000` |
| `Docker: Build & Push` | Windows / Linux | Build then push |
| `Docker: Multi-arch Build & Push` | Windows / Linux | `buildx` push for ARM64 + AMD64 |
| `Backend: Run` | Both | `go run ./cmd/server` |
| `Frontend: Dev` | Both | `npm run dev` |
| `Frontend: Build` | Both | Production Vite build |
## License