Files
NetAlertX/.devcontainer/devcontainer.json

86 lines
2.7 KiB
JSON
Executable File

{
"name": "NetAlertX DevContainer",
"remoteUser": "netalertx",
"workspaceFolder": "/workspaces/NetAlertX",
"build": {
"dockerfile": "./Dockerfile", // Dockerfile generated by script
"context": "../", // Context is the root of the repository
"target": "netalertx-devcontainer"
},
"capAdd": [
"SYS_ADMIN", // For mounting ramdisks
"NET_ADMIN", // For network interface configuration
"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,5678],
"portsAttributes": { // the ports we care about
"20211": {
"label": "Frontend:Nginx+PHP"
},
"20212": {
"label": "Backend:GraphQL"
},
"9003": {
"label": "PHP Debug:Xdebug"
},
"5678": {
"label": "Python Debug:debugpy"
}
},
"postStartCommand": "${containerWorkspaceFolder}/.devcontainer/scripts/setup.sh",
"customizations": {
"vscode": {
"extensions": [
"ms-python.python",
"ms-azuretools.vscode-docker",
"felixfbecker.php-debug",
"bmewburn.vscode-intelephense-client",
"xdebug.php-debug",
"ms-python.vscode-pylance",
"pamaron.pytest-runner",
"coderabbit.coderabbit-vscode",
"ms-python.black-formatter",
"jeff-hykin.better-dockerfile-syntax",
"GitHub.codespaces",
"ms-azuretools.vscode-containers",
"ms-python.vscode-python-envs",
"dbaeumer.vscode-eslint",
"esbenp.prettier-vscode",
"eamodio.gitlens",
"alexcvzz.vscode-sqlite",
"yzhang.markdown-all-in-one",
"mkhl.shfmt"
],
"settings": {
"terminal.integrated.cwd": "${containerWorkspaceFolder}",
// Python testing configuration
"python.testing.pytestEnabled": true,
"python.testing.unittestEnabled": false,
"python.testing.pytestArgs": ["test"],
// Make sure we discover tests and import server correctly
"python.analysis.extraPaths": [
"/workspaces/NetAlertX",
"/workspaces/NetAlertX/server",
"/app",
"/app/server"
]
}
}
},
"shutdownAction": "stopContainer" // stop container when VSCode is closed
}