Make inventory items more dynamic

This commit is contained in:
2026-08-27 01:31:10 +03:00
parent 0c195eca1b
commit 100c0797a4
3 changed files with 145 additions and 2 deletions
+113
View File
@@ -1,6 +1,119 @@
{
"version": "2.0.0",
"tasks": [
{
"label": "Rebuild Stockroom Docker app",
"type": "shell",
"command": "docker",
"args": [
"compose",
"up",
"--build",
"-d"
],
"isBackground": false,
"problemMatcher": []
},
{
"label": "Rebuild Stockroom Docker app",
"type": "shell",
"command": "docker",
"args": [
"compose",
"up",
"--build",
"-d"
],
"isBackground": false,
"problemMatcher": []
},
{
"label": "Inspect container inventory database",
"type": "shell",
"command": "docker",
"args": [
"compose",
"exec",
"-T",
"inventory",
"python",
"-c",
"import sqlite3; c=sqlite3.connect('/data/inventory.db'); print(c.execute('select count(*) from inventory_items').fetchone()[0]); print(c.execute('select count(*) from inventory_images').fetchone()[0])"
],
"isBackground": false,
"problemMatcher": []
},
{
"label": "Inspect Docker inventory mount",
"type": "shell",
"command": "docker",
"args": [
"inspect",
"storageinventory-inventory-1",
"--format={{json .Mounts}}"
],
"isBackground": false,
"problemMatcher": []
},
{
"label": "Check container database count",
"type": "shell",
"command": "docker",
"args": [
"compose",
"exec",
"-T",
"inventory",
"python",
"-c",
"import sqlite3; print(sqlite3.connect(\"/data/inventory.db\").execute(\"select count(*) from inventory_items\").fetchone()[0])"
],
"isBackground": false,
"problemMatcher": []
},
{
"label": "List container data files",
"type": "shell",
"command": "docker",
"args": [
"compose",
"exec",
"-T",
"inventory",
"ls",
"-l",
"/data"
],
"isBackground": false,
"problemMatcher": []
},
{
"label": "Check container database path",
"type": "shell",
"command": "docker",
"args": [
"compose",
"exec",
"-T",
"inventory",
"printenv",
"DATABASE_PATH"
],
"isBackground": false,
"problemMatcher": []
},
{
"label": "Check running inventory containers",
"type": "shell",
"command": "docker",
"args": [
"ps",
"--format",
"{{.Names}} {{.Ports}}"
],
"isBackground": false,
"problemMatcher": []
},
{
"label": "Rebuild Stockroom Docker app",
"type": "shell",