2022-08-09 06:06:32 +00:00
|
|
|
// For format details, see https://aka.ms/devcontainer.json. For config options, see the README at:
|
|
|
|
// https://github.com/microsoft/vscode-dev-containers/tree/v0.241.1/containers/python-3
|
|
|
|
{
|
2024-02-28 04:04:14 +00:00
|
|
|
"name": "InvenTree devcontainer",
|
|
|
|
"dockerComposeFile": "docker-compose.yml",
|
|
|
|
"service": "inventree",
|
|
|
|
"overrideCommand": true,
|
|
|
|
"workspaceFolder": "/home/inventree/",
|
2022-08-09 06:06:32 +00:00
|
|
|
|
|
|
|
// Configure tool-specific properties.
|
|
|
|
"customizations": {
|
|
|
|
// Configure properties specific to VS Code.
|
|
|
|
"vscode": {
|
|
|
|
// Set *default* container specific settings.json values on container create.
|
|
|
|
"settings": {
|
2023-05-12 07:13:48 +00:00
|
|
|
"python.defaultInterpreterPath": "${containerWorkspaceFolder}/dev/venv/bin/python",
|
2022-08-09 06:06:32 +00:00
|
|
|
"python.linting.enabled": true,
|
|
|
|
"python.linting.pylintEnabled": false,
|
|
|
|
"python.formatting.autopep8Path": "/usr/local/py-utils/bin/autopep8",
|
|
|
|
"python.formatting.blackPath": "/usr/local/py-utils/bin/black",
|
|
|
|
"python.formatting.yapfPath": "/usr/local/py-utils/bin/yapf",
|
|
|
|
"python.linting.banditPath": "/usr/local/py-utils/bin/bandit",
|
|
|
|
"python.linting.mypyPath": "/usr/local/py-utils/bin/mypy",
|
|
|
|
"python.linting.pycodestylePath": "/usr/local/py-utils/bin/pycodestyle",
|
|
|
|
"python.linting.pydocstylePath": "/usr/local/py-utils/bin/pydocstyle",
|
|
|
|
"python.linting.pylintPath": "/usr/local/py-utils/bin/pylint"
|
|
|
|
},
|
|
|
|
|
|
|
|
// Add the IDs of extensions you want installed when the container is created.
|
|
|
|
"extensions": [
|
|
|
|
"ms-python.python",
|
|
|
|
"ms-python.vscode-pylance",
|
2023-05-05 12:34:42 +00:00
|
|
|
"batisteo.vscode-django",
|
|
|
|
"eamodio.gitlens"
|
2022-08-09 06:06:32 +00:00
|
|
|
]
|
|
|
|
}
|
|
|
|
},
|
|
|
|
|
|
|
|
// Use 'forwardPorts' to make a list of ports inside the container available locally.
|
2024-02-28 04:04:14 +00:00
|
|
|
"forwardPorts": [5173, 8000, 8080],
|
2022-08-09 06:06:32 +00:00
|
|
|
"portsAttributes": {
|
2023-12-04 20:05:48 +00:00
|
|
|
"5173": {
|
2024-02-28 04:04:14 +00:00
|
|
|
"label": "Vite Server"
|
2023-12-04 20:05:48 +00:00
|
|
|
},
|
2022-08-09 06:06:32 +00:00
|
|
|
"8000": {
|
2024-02-28 04:04:14 +00:00
|
|
|
"label": "InvenTree Server"
|
|
|
|
},
|
|
|
|
"8080": {
|
|
|
|
"label": "mkdocs server"
|
2022-08-09 06:06:32 +00:00
|
|
|
}
|
|
|
|
},
|
|
|
|
|
|
|
|
// Use 'postCreateCommand' to run commands after the container is created.
|
2024-02-28 04:04:14 +00:00
|
|
|
"postCreateCommand": ".devcontainer/postCreateCommand.sh",
|
2022-08-09 06:06:32 +00:00
|
|
|
|
|
|
|
// Comment out to connect as root instead. More info: https://aka.ms/vscode-remote/containers/non-root.
|
|
|
|
"remoteUser": "vscode",
|
2023-12-04 20:05:48 +00:00
|
|
|
"containerUser": "vscode",
|
2022-08-09 06:06:32 +00:00
|
|
|
|
|
|
|
"remoteEnv": {
|
|
|
|
|
|
|
|
// Python config
|
|
|
|
"PIP_USER": "no",
|
|
|
|
|
2023-05-05 12:34:42 +00:00
|
|
|
// used to load the venv into the PATH and activate it
|
2022-08-09 06:06:32 +00:00
|
|
|
// Ref: https://stackoverflow.com/a/56286534
|
2023-05-12 07:13:48 +00:00
|
|
|
"VIRTUAL_ENV": "${containerWorkspaceFolder}/dev/venv",
|
|
|
|
"PATH": "${containerWorkspaceFolder}/dev/venv/bin:${containerEnv:PATH}"
|
2022-08-09 06:06:32 +00:00
|
|
|
}
|
|
|
|
}
|