2023-07-03 12:55:33 +03:00
|
|
|
|
// For format details, see https://containers.dev/implementors/json_reference/
|
|
|
|
|
{
|
|
|
|
|
"name": "{{cookiecutter.project_slug}}_dev",
|
|
|
|
|
"dockerComposeFile": [
|
|
|
|
|
"../local.yml"
|
|
|
|
|
],
|
|
|
|
|
"init": true,
|
|
|
|
|
"mounts": [
|
|
|
|
|
{
|
|
|
|
|
"source": "./.devcontainer/bash_history",
|
|
|
|
|
"target": "/home/dev-user/.bash_history",
|
|
|
|
|
"type": "bind"
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
"source": "~/.ssh",
|
|
|
|
|
"target": "/home/dev-user/.ssh",
|
|
|
|
|
"type": "bind"
|
|
|
|
|
}
|
|
|
|
|
],
|
|
|
|
|
// Tells devcontainer.json supporting services / tools whether they should run
|
|
|
|
|
// /bin/sh -c "while sleep 1000; do :; done" when starting the container instead of the container’s default command
|
2023-08-14 12:50:47 +03:00
|
|
|
|
"overrideCommand": false,
|
2023-07-03 12:55:33 +03:00
|
|
|
|
"service": "django",
|
|
|
|
|
// "remoteEnv": {"PATH": "/home/dev-user/.local/bin:${containerEnv:PATH}"},
|
|
|
|
|
"remoteUser": "dev-user",
|
|
|
|
|
"workspaceFolder": "/app",
|
|
|
|
|
// Set *default* container specific settings.json values on container create.
|
|
|
|
|
"customizations": {
|
|
|
|
|
{%- if cookiecutter.editor == "VS Code" %}
|
|
|
|
|
"vscode": {
|
|
|
|
|
"settings": {
|
|
|
|
|
"editor.formatOnSave": true,
|
|
|
|
|
"[python]": {
|
|
|
|
|
"analysis.autoImportCompletions": true,
|
|
|
|
|
"analysis.typeCheckingMode": "basic",
|
|
|
|
|
"defaultInterpreterPath": "/usr/local/bin/python",
|
|
|
|
|
"editor.codeActionsOnSave": {
|
2024-02-23 17:35:52 +03:00
|
|
|
|
"source.organizeImports": "always"
|
2023-07-03 12:55:33 +03:00
|
|
|
|
},
|
2024-02-06 21:56:31 +03:00
|
|
|
|
"editor.defaultFormatter": "charliermarsh.ruff",
|
2023-07-03 12:55:33 +03:00
|
|
|
|
"languageServer": "Pylance",
|
|
|
|
|
"linting.enabled": true,
|
|
|
|
|
"linting.mypyEnabled": true,
|
|
|
|
|
"linting.mypyPath": "/usr/local/bin/mypy",
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
// https://code.visualstudio.com/docs/remote/devcontainerjson-reference#_vs-code-specific-properties
|
|
|
|
|
// Add the IDs of extensions you want installed when the container is created.
|
|
|
|
|
"extensions": [
|
|
|
|
|
"davidanson.vscode-markdownlint",
|
|
|
|
|
"mrmlnc.vscode-duplicate",
|
|
|
|
|
"visualstudioexptteam.vscodeintellicode",
|
|
|
|
|
"visualstudioexptteam.intellicode-api-usage-examples",
|
|
|
|
|
// python
|
|
|
|
|
"ms-python.python",
|
|
|
|
|
"ms-python.vscode-pylance",
|
2024-02-23 17:35:52 +03:00
|
|
|
|
"charliermarsh.ruff",
|
2023-07-03 12:55:33 +03:00
|
|
|
|
// django
|
|
|
|
|
"batisteo.vscode-django"
|
|
|
|
|
]
|
|
|
|
|
}
|
|
|
|
|
{%- endif %}
|
|
|
|
|
},
|
|
|
|
|
// Uncomment the next line if you want start specific services in your Docker Compose config.
|
|
|
|
|
// "runServices": [],
|
|
|
|
|
// Uncomment the next line if you want to keep your containers running after VS Code shuts down.
|
|
|
|
|
// "shutdownAction": "none",
|
|
|
|
|
// Uncomment the next line to run commands after the container is created.
|
|
|
|
|
"postCreateCommand": "cat .devcontainer/bashrc.override.sh >> ~/.bashrc"
|
|
|
|
|
}
|