all debugging online.

This commit is contained in:
Adam Outler
2025-10-03 22:12:42 +00:00
parent 1e04e9f571
commit ada92715a8
11 changed files with 151 additions and 46 deletions

View File

@@ -1,27 +1,49 @@
{
"name": "NetAlertX DevContainer",
"remoteUser": "netalertx",
"workspaceFolder": "/workspaces/NetAlertX",
"build": {
"dockerfile": "./Dockerfile",
"context": "../",
"dockerfile": "./Dockerfile", // Dockerfile generated by script
"context": "../", // Context is the root of the repository
"target": "netalertx-devcontainer"
},
"workspaceFolder": "/workspaces/NetAlertX",
"runArgs": [
"--add-host=host.docker.internal:host-gateway",
"--security-opt", "apparmor=unconfined" // for alowing ramdisk mounts
],
"capAdd": [
"SYS_ADMIN", // For mounting ramdisks
"NET_ADMIN", // For network interface configuration
"NET_RAW" // For raw packet manipulation
"NET_RAW" // For raw packet manipulation
],
"runArgs": [
"--security-opt",
"apparmor=unconfined" // for allowing ramdisk mounts
// Uncomment --network=host to run full NetAlertX scanning capabilities of network scanning in
// container. This runs too slowly in a large network to be practical for development purposes.
// You can start services such as avahi on the host, in other containers within the network, or
// even within this container and connect to them as needed.
// "--network=host",
],
// ATTENTION: If running with --network=host, COMMENT `forwardPorts` OR ELSE THERE WILL BE NO WEBUI!
"forwardPorts": [20211, 20212, 9003, 9000, 5678],
"portsAttributes": { // the ports we care about
"20211": {
"label": "Frontend:Nginx+PHP"
},
"20212": {
"label": "Backend:GraphQL"
},
"9003": {
"label": "PHP Debug:Xdebug"
},
"9000": {
"label": "PHP-FPM:FastCGI"
},
"5678": {
"label": "Python Debug:debugpy"
}
},
"postStartCommand": "${containerWorkspaceFolder}/.devcontainer/scripts/setup.sh",
"customizations": {
"vscode": {
"extensions": [
@@ -43,16 +65,13 @@
"eamodio.gitlens",
"alexcvzz.vscode-sqlite",
"yzhang.markdown-all-in-one"
]
,
],
"settings": {
"terminal.integrated.cwd": "${containerWorkspaceFolder}",
// Python testing configuration
"python.testing.pytestEnabled": true,
"python.testing.unittestEnabled": false,
"python.testing.pytestArgs": [
"test"
],
"python.testing.pytestArgs": ["test"],
// Make sure we discover tests and import server correctly
"python.analysis.extraPaths": [
"/workspaces/NetAlertX",
@@ -63,26 +82,6 @@
}
}
},
"forwardPorts": [5678, 9000, 9003, 20211, 20212],
"portsAttributes": {
"20211": {
"label": "Frontend:Nginx+PHP"
},
"20212": {
"label": "Backend:GraphQL"
},
"9003": {
"label": "PHP Debug:Xdebug"
},
"9000": {
"label": "PHP-FPM:FastCGI"
},
"5678": {
"label": "Python Debug:debugpy"
}
},
// Optional: ensures compose services are stopped when you close the window
"shutdownAction": "stopContainer"
}
"shutdownAction": "stopContainer" // stop container when VSCode is closed
}