{
"version": "2.0.0",
"tasks": [
// The API and UI containers needs to be in the same docker network
{
"label": "docker-create-network",
"type": "shell",
"command": "docker network create keep-network || true",
"problemMatcher": []
},
// Build the api container
{
"label": "docker-build-api-dev",
"type": "docker-build",
"dockerBuild": {
"context": "${workspaceFolder}",
"dockerfile": "${workspaceFolder}/Docker/Dockerfile.dev.api",
"tag": "keep-api-dev:latest"
}
},
// Run the api container
{
"label": "docker-run-api-dev",
"type": "docker-run",
"dependsOn": [
"docker-build-api-dev", "docker-create-network"
],
"python": {
"args": [
"api"
],
"file": "./keep/cli/cli.py"
},
"dockerRun": {
"network": "keep-network",
"image": "keep-api-dev:latest",
"containerName": "keep-api",
"ports": [
{
"containerPort": 8080,
"hostPort": 8080
}
],
"env": {
"DEBUG": "1",
"SECRET_MANAGER_TYPE": "FILE",
"USE_NGROK": "false",
"AUTH_TYPE": "DB"
},
"volumes": [
{
"containerPath": "/app",
"localPath": "${workspaceFolder}"
}
]
}
},
// Build the UI container
{
"label": "docker-build-ui",
"type": "docker-build",
"dockerBuild": {
"context": "${workspaceFolder}",
"dockerfile": "${workspaceFolder}/Docker/Dockerfile.dev.ui",
"tag": "keep-ui-dev:latest"
}
},
// Run the UI container
{
"type": "docker-run",
"label": "docker-run-ui",
"dependsOn": [
"docker-build-ui", "docker-create-network"
],
"dockerRun": {
"network": "keep-network",
"image": "keep-ui-dev:latest",
"containerName": "keep-ui",
"env": {
// Uncomment for fully debug
// "DEBUG": "*",
"NODE_ENV": "development",
"API_URL": "http://keep-api:8080",
"AUTH_TYPE": "DB",
},
"volumes": [
{
"containerPath": "/app",
"localPath": "${workspaceFolder}/keep-ui"
}
],
"ports": [
{
"containerPort": 9229,
"hostPort": 9229
},
{
"containerPort": 3000,
"hostPort": 3000
}
],
"command": "npm run dev",
},
"node": {
"package": "${workspaceFolder}/keep-ui/package.json",
"enableDebugging": true
}
}
]
}