|
2 | 2 | // https://github.com/microsoft/vscode-dev-containers/tree/v0.238.0/containers/python-3-postgres |
3 | 3 | // Update the VARIANT arg in docker-compose.yml to pick a Python version |
4 | 4 | { |
5 | | - "name": "NetBox Plugin Development", |
6 | | - "dockerComposeFile": [ |
7 | | - "docker-compose.yml", |
8 | | - "docker-compose.override.yml" |
9 | | - ], |
10 | | - "service": "netbox", |
11 | | - //"workspaceMount": "source=${localWorkspaceFolder},target=/opt/netbox/netbox/netbox-acls,type=bind,consistency=cached", |
12 | | - "workspaceFolder": "/opt/netbox/netbox/netbox-acls", |
| 5 | + "name": "NetBox Plugin Development", |
| 6 | + "dockerComposeFile": ["docker-compose.yml", "docker-compose.override.yml"], |
| 7 | + "service": "netbox", |
| 8 | + //"workspaceMount": "source=${localWorkspaceFolder},target=/opt/netbox/netbox/netbox-acls,type=bind,consistency=cached", |
| 9 | + "workspaceFolder": "/opt/netbox/netbox/netbox-acls", |
13 | 10 |
|
14 | | - "overrideCommand":false, |
| 11 | + "overrideCommand": false, |
15 | 12 |
|
16 | | - // Configure tool-specific properties. |
17 | | - "customizations": { |
18 | | - // Configure properties specific to VS Code. |
19 | | - "vscode": { |
20 | | - // Set *default* container specific settings.json values on container create. |
21 | | - "settings": { |
22 | | - "editor.experimental.stickyScroll.enabled": true, |
23 | | - //"[python]": { |
24 | | - // "editor.codeActionsOnSave": { |
25 | | - // "source.organizeImports": true |
26 | | - // } |
27 | | - //}, |
28 | | - "isort.args": [ |
29 | | - "--profile=black" |
30 | | - ], |
31 | | - "isort.path": "/opt/netbox/venv/bin/isort", |
32 | | - "python.analysis.typeCheckingMode": "strict", |
33 | | - python.Jedi |
34 | | - "python.analysis.extraPaths": [ |
35 | | - "/opt/netbox/netbox" |
36 | | - ], |
37 | | - "python.autoComplete.extraPaths": [ |
38 | | - "/opt/netbox/netbox" |
39 | | - ], |
40 | | - "python.defaultInterpreterPath": "/opt/netbox/venv/bin/python3", |
41 | | - "python.formatting.autopep8Path": "/opt/netbox/venv/bin/autopep8", |
42 | | - "python.formatting.blackPath": "/opt/netbox/venv/bin/black", |
43 | | - "python.formatting.provider": "black", |
44 | | - "python.formatting.yapfPath": "/opt/netbox/venv/bin/yapf", |
45 | | - "python.linting.banditPath": "/opt/netbox/venv/bin/bandit", |
46 | | - "python.linting.enabled": true, |
47 | | - "python.linting.flake8Path": "/opt/netbox/venv/bin/flake8", |
48 | | - "python.linting.flake8Args": [ |
49 | | - "--max-line-length=160", |
50 | | - "--ignore=E203" |
51 | | - ], |
52 | | - "python.linting.mypyPath": "//opt/netbox/venv/bin/mypy", |
53 | | - "python.linting.pycodestylePath": "/opt/netbox/venv/bin/pycodestyle", |
54 | | - "python.linting.pydocstylePath": "/opt/netbox/venv/bin/pydocstyle", |
55 | | - "python.linting.pylintArgs": [ |
56 | | - "--load-plugins", |
57 | | - "pylint_django", |
58 | | - "--errors-only", |
59 | | - "--load-plugins=pylint_django", |
60 | | - "--django-settings-module=/opt/netbox/netbox/netbox/netbox.settings", |
61 | | - "--enable=W0602,W0611,W0612,W0613,W0614" |
62 | | - ], |
63 | | - "python.linting.pylintEnabled": true, |
64 | | - "python.linting.pylintPath": "/opt/netbox/venv/bin/pylint", |
65 | | - "python.linting.lintOnSave": true, |
66 | | - "python.pythonPath": "/opt/netbox/venv/bin/python3", |
67 | | - "python.terminal.activateEnvironment": true, |
68 | | - "python.venvPath": "/opt/netbox/", |
69 | | - "files.exclude": { |
70 | | - "**/node_modules": true, |
71 | | - "build": true, |
72 | | - "dist": true, |
73 | | - "*egg*": true |
74 | | - } |
75 | | - }, |
| 13 | + // Configure tool-specific properties. |
| 14 | + "customizations": { |
| 15 | + // Configure properties specific to VS Code. |
| 16 | + "vscode": { |
| 17 | + // Set *default* container specific settings.json values on container create. |
| 18 | + "settings": { |
| 19 | + "editor.experimental.stickyScroll.enabled": true, |
| 20 | + //"[python]": { |
| 21 | + // "editor.codeActionsOnSave": { |
| 22 | + // "source.organizeImports": true |
| 23 | + // } |
| 24 | + //}, |
| 25 | + "isort.args": ["--profile=black"], |
| 26 | + "isort.path": ["/opt/netbox/venv/bin/isort"], |
| 27 | + "python.analysis.typeCheckingMode": "strict", |
| 28 | + "python.analysis.extraPaths": ["/opt/netbox/netbox"], |
| 29 | + "python.autoComplete.extraPaths": ["/opt/netbox/netbox"], |
| 30 | + "python.defaultInterpreterPath": "/opt/netbox/venv/bin/python3", |
| 31 | + "python.formatting.autopep8Path": "/opt/netbox/venv/bin/autopep8", |
| 32 | + "python.formatting.blackPath": "/opt/netbox/venv/bin/black", |
| 33 | + "python.formatting.provider": "black", |
| 34 | + "python.formatting.yapfPath": "/opt/netbox/venv/bin/yapf", |
| 35 | + "python.linting.banditPath": "/opt/netbox/venv/bin/bandit", |
| 36 | + "python.linting.enabled": true, |
| 37 | + "python.linting.flake8Path": "/opt/netbox/venv/bin/flake8", |
| 38 | + "python.linting.flake8Args": ["--max-line-length=160", "--ignore=E203"], |
| 39 | + "python.linting.mypyPath": "//opt/netbox/venv/bin/mypy", |
| 40 | + "python.linting.pycodestylePath": "/opt/netbox/venv/bin/pycodestyle", |
| 41 | + "python.linting.pydocstylePath": "/opt/netbox/venv/bin/pydocstyle", |
| 42 | + "python.linting.pylintArgs": [ |
| 43 | + "--load-plugins", |
| 44 | + "pylint_django", |
| 45 | + "--errors-only", |
| 46 | + "--load-plugins=pylint_django", |
| 47 | + "--django-settings-module=/opt/netbox/netbox/netbox/netbox.settings", |
| 48 | + "--enable=W0602,W0611,W0612,W0613,W0614" |
| 49 | + ], |
| 50 | + "python.linting.pylintEnabled": true, |
| 51 | + "python.linting.pylintPath": "/opt/netbox/venv/bin/pylint", |
| 52 | + "python.linting.lintOnSave": true, |
| 53 | + "python.pythonPath": "/opt/netbox/venv/bin/python3", |
| 54 | + "python.terminal.activateEnvironment": true, |
| 55 | + "python.venvPath": "/opt/netbox/", |
| 56 | + "files.exclude": { |
| 57 | + "**/node_modules": true, |
| 58 | + "build": true, |
| 59 | + "dist": true, |
| 60 | + "*egg*": true |
| 61 | + } |
| 62 | + }, |
76 | 63 |
|
77 | | - // Add the IDs of extensions you want installed when the container is created. |
78 | | - "extensions": [ |
79 | | - "DavidAnson.vscode-markdownlint", |
80 | | - "GitHub.codespaces", |
81 | | - "GitHub.copilot-labs", |
82 | | - "GitHub.vscode-pull-request-github", |
83 | | - "Gruntfuggly.todo-tree", |
84 | | - "Tyriar.sort-lines", |
85 | | - "aaron-bond.better-comments", |
86 | | - "batisteo.vscode-django", |
87 | | - "charliermarsh.ruff", |
88 | | - "codezombiech.gitignore", |
89 | | - "esbenp.prettier-vscode", |
90 | | - "exiasr.hadolint", |
91 | | - "formulahendry.auto-rename-tag", |
92 | | - "mintlify.document", |
93 | | - "ms-python.isort", |
94 | | - "ms-python.pylint", |
95 | | - "ms-python.python", |
96 | | - "ms-python.vscode-pylance", |
97 | | - "ms-vscode.makefile-tools", |
98 | | - "mutantdino.resourcemonitor", |
99 | | - "oderwat.indent-rainbow", |
100 | | - "paulomenezes.duplicated-code", |
101 | | - "redhat.vscode-yaml", |
102 | | - "searKing.preview-vscode", |
103 | | - "sourcery.sourcery", |
104 | | - "wholroyd.jinja", |
105 | | - "yzhang.markdown-all-in-one" |
106 | | - ] |
107 | | - } |
108 | | - }, |
| 64 | + // Add the IDs of extensions you want installed when the container is created. |
| 65 | + "extensions": [ |
| 66 | + "DavidAnson.vscode-markdownlint", |
| 67 | + "GitHub.codespaces", |
| 68 | + "GitHub.copilot-labs", |
| 69 | + "GitHub.vscode-pull-request-github", |
| 70 | + "Gruntfuggly.todo-tree", |
| 71 | + "Tyriar.sort-lines", |
| 72 | + "aaron-bond.better-comments", |
| 73 | + "batisteo.vscode-django", |
| 74 | + "charliermarsh.ruff", |
| 75 | + "codezombiech.gitignore", |
| 76 | + "esbenp.prettier-vscode", |
| 77 | + "exiasr.hadolint", |
| 78 | + "formulahendry.auto-rename-tag", |
| 79 | + "mintlify.document", |
| 80 | + "ms-python.isort", |
| 81 | + "ms-python.pylint", |
| 82 | + "ms-python.python", |
| 83 | + "ms-python.vscode-pylance", |
| 84 | + "ms-vscode.makefile-tools", |
| 85 | + "mutantdino.resourcemonitor", |
| 86 | + "oderwat.indent-rainbow", |
| 87 | + "paulomenezes.duplicated-code", |
| 88 | + "redhat.vscode-yaml", |
| 89 | + "searKing.preview-vscode", |
| 90 | + "sourcery.sourcery", |
| 91 | + "wholroyd.jinja", |
| 92 | + "yzhang.markdown-all-in-one" |
| 93 | + ] |
| 94 | + } |
| 95 | + }, |
109 | 96 |
|
110 | | - // Use 'forwardPorts' to make a list of ports inside the container available locally. |
111 | | - // This can be used to network with other containers or the host. |
112 | | - // "forwardPorts": [5000, 5432], |
| 97 | + // Use 'forwardPorts' to make a list of ports inside the container available locally. |
| 98 | + // This can be used to network with other containers or the host. |
| 99 | + // "forwardPorts": [5000, 5432], |
113 | 100 |
|
114 | | - // Use 'postCreateCommand' to run commands after the container is created. |
115 | | - // "postCreateCommand": "pip install --user -r requirements-dev.txt", |
| 101 | + // Use 'postCreateCommand' to run commands after the container is created. |
| 102 | + // "postCreateCommand": "pip install --user -r requirements-dev.txt", |
116 | 103 |
|
117 | | - //"postAttachCommand": "source /opt/netbox/venv/bin/activate", |
118 | | - |
119 | | - // Comment out to connect as root instead. More info: https://aka.ms/vscode-remote/containers/non-root. |
120 | | - "remoteUser": "vscode" |
| 104 | + //"postAttachCommand": "source /opt/netbox/venv/bin/activate", |
121 | 105 |
|
| 106 | + // Comment out to connect as root instead. More info: https://aka.ms/vscode-remote/containers/non-root. |
| 107 | + "remoteUser": "ubuntu" |
122 | 108 | } |
0 commit comments