|
1 | 1 | // For format details, see https://aka.ms/devcontainer.json. For config options, see the README at: |
2 | 2 | // https://github.com/microsoft/vscode-dev-containers/tree/v0.202.5/containers/python-3 |
3 | 3 | { |
4 | | - "name": "IETF Datatracker", |
5 | | - "dockerComposeFile": "docker-compose.yml", |
| 4 | + "name": "IETF Datatracker", |
| 5 | + "dockerComposeFile": ["../docker/docker-compose.yml", "docker-compose.extend.yml"], |
6 | 6 | "service": "app", |
7 | | - "workspaceFolder": "/usr/local/share/datatracker", |
| 7 | + "workspaceFolder": "/root/src", |
8 | 8 | "shutdownAction": "stopCompose", |
9 | 9 | "postCreateCommand": "/docker-init.sh", |
10 | | - |
11 | | - // Set *default* container specific settings.json values on container create. |
12 | | - "settings": { |
| 10 | + "containerEnv": { |
| 11 | + "EDITOR_VSCODE": "true" |
| 12 | + }, |
| 13 | + |
| 14 | + // Set *default* container specific settings.json values on container create. |
| 15 | + "settings": { |
13 | 16 | "terminal.integrated.defaultProfile.linux": "zsh", |
14 | | - "python.pythonPath": "/usr/local/bin/python", |
15 | | - "python.languageServer": "Pylance", |
16 | | - "python.linting.enabled": true, |
17 | | - "python.linting.pylintEnabled": true, |
18 | | - "python.formatting.autopep8Path": "/usr/local/py-utils/bin/autopep8", |
19 | | - "python.formatting.blackPath": "/usr/local/py-utils/bin/black", |
20 | | - "python.formatting.yapfPath": "/usr/local/py-utils/bin/yapf", |
21 | | - "python.linting.banditPath": "/usr/local/py-utils/bin/bandit", |
22 | | - "python.linting.flake8Path": "/usr/local/py-utils/bin/flake8", |
23 | | - "python.linting.mypyPath": "/usr/local/py-utils/bin/mypy", |
24 | | - "python.linting.pycodestylePath": "/usr/local/py-utils/bin/pycodestyle", |
25 | | - "python.linting.pydocstylePath": "/usr/local/py-utils/bin/pydocstyle", |
26 | | - "python.linting.pylintPath": "/usr/local/py-utils/bin/pylint", |
| 17 | + "python.pythonPath": "/usr/local/bin/python", |
| 18 | + "python.languageServer": "Pylance", |
| 19 | + "python.linting.enabled": true, |
| 20 | + "python.linting.pylintEnabled": true, |
| 21 | + "python.formatting.autopep8Path": "/usr/local/py-utils/bin/autopep8", |
| 22 | + "python.formatting.blackPath": "/usr/local/py-utils/bin/black", |
| 23 | + "python.formatting.yapfPath": "/usr/local/py-utils/bin/yapf", |
| 24 | + "python.linting.banditPath": "/usr/local/py-utils/bin/bandit", |
| 25 | + "python.linting.flake8Path": "/usr/local/py-utils/bin/flake8", |
| 26 | + "python.linting.mypyPath": "/usr/local/py-utils/bin/mypy", |
| 27 | + "python.linting.pycodestylePath": "/usr/local/py-utils/bin/pycodestyle", |
| 28 | + "python.linting.pydocstylePath": "/usr/local/py-utils/bin/pydocstyle", |
| 29 | + "python.linting.pylintPath": "/usr/local/py-utils/bin/pylint", |
27 | 30 | "python.testing.pytestArgs": [ |
28 | 31 | "ietf" |
29 | 32 | ], |
|
35 | 38 | "./ietf", |
36 | 39 | "-p", |
37 | 40 | "test*.py" |
| 41 | + ], |
| 42 | + "sqltools.connections": [ |
| 43 | + // Default connection to dev DB container |
| 44 | + { |
| 45 | + "name": "Local Dev", |
| 46 | + "server": "db", |
| 47 | + "port": 3306, |
| 48 | + "database": "ietf_utf8", |
| 49 | + "username": "django", |
| 50 | + "password": "RkTkDPFnKpko", |
| 51 | + "driver": "MySQL", |
| 52 | + "askForPassword": false, |
| 53 | + "connectionTimeout": 60 |
| 54 | + } |
38 | 55 | ] |
39 | 56 | // "python.envFile": "${workspaceFolder}/.devcontainer/dev.env" |
40 | | - }, |
41 | | - |
42 | | - // Add the IDs of extensions you want installed when the container is created. |
43 | | - "extensions": [ |
44 | | - "ms-python.python", |
45 | | - "ms-python.vscode-pylance", |
46 | | - "ms-azuretools.vscode-docker", |
47 | | - "editorconfig.editorconfig", |
48 | | - "redhat.vscode-yaml", |
49 | | - "visualstudioexptteam.vscodeintellicode", |
50 | | - "batisteo.vscode-django", |
51 | | - ], |
52 | | - |
53 | | - // Use 'forwardPorts' to make a list of ports inside the container available locally. |
54 | | - "forwardPorts": [8000, 3306] |
55 | | - |
56 | | - // Use 'postCreateCommand' to run commands after the container is created. |
57 | | - // "postCreateCommand": "sh /docker-init.sh", |
58 | | - |
59 | | - // Comment out connect as root instead. More info: https://aka.ms/vscode-remote/containers/non-root. |
60 | | - // "remoteUser": "django" |
| 57 | + }, |
| 58 | + |
| 59 | + // Add the IDs of extensions you want installed when the container is created. |
| 60 | + "extensions": [ |
| 61 | + "ms-python.python", |
| 62 | + "ms-python.vscode-pylance", |
| 63 | + "ms-azuretools.vscode-docker", |
| 64 | + "editorconfig.editorconfig", |
| 65 | + "redhat.vscode-yaml", |
| 66 | + "visualstudioexptteam.vscodeintellicode", |
| 67 | + "batisteo.vscode-django", |
| 68 | + "mutantdino.resourcemonitor", |
| 69 | + "spmeesseman.vscode-taskexplorer", |
| 70 | + "mtxr.sqltools", |
| 71 | + "mtxr.sqltools-driver-mysql" |
| 72 | + ], |
| 73 | + |
| 74 | + // Use 'forwardPorts' to make a list of ports inside the container available locally. |
| 75 | + "forwardPorts": [8000, 3306], |
| 76 | + |
| 77 | + "portsAttributes": { |
| 78 | + "8000": { |
| 79 | + "label": "Datatracker", |
| 80 | + "onAutoForward": "notify" |
| 81 | + }, |
| 82 | + "3306": { |
| 83 | + "label": "MariaDB", |
| 84 | + "onAutoForward": "silent" |
| 85 | + } |
| 86 | + } |
| 87 | + |
| 88 | + // Use 'postCreateCommand' to run commands after the container is created. |
| 89 | + // "postCreateCommand": "sh /docker-init.sh", |
| 90 | + |
| 91 | + // Comment out connect as root instead. More info: https://aka.ms/vscode-remote/containers/non-root. |
| 92 | + // "remoteUser": "django" |
61 | 93 | } |
0 commit comments