131 lines
2.4 KiB
JSON
131 lines
2.4 KiB
JSON
{
|
|
"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",
|
|
"command": "docker",
|
|
"args": [
|
|
"compose",
|
|
"up",
|
|
"--build",
|
|
"-d"
|
|
],
|
|
"isBackground": false,
|
|
"problemMatcher": []
|
|
}
|
|
]
|
|
} |