mirror of
https://github.com/cookiecutter/cookiecutter-django.git
synced 2024-11-28 04:24:02 +03:00
10c85ce3d6
* Renamed local.yml to docker-compose.local.yml * Renamed production.yml to docker-compose.production.yml * Rename docs.yml to docker-compose.docs.yml * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Bruno Alla <alla.brunoo@gmail.com>
71 lines
2.9 KiB
JSON
71 lines
2.9 KiB
JSON
// For format details, see https://containers.dev/implementors/json_reference/
|
||
{
|
||
"name": "{{cookiecutter.project_slug}}_dev",
|
||
"dockerComposeFile": [
|
||
"../docker-compose.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
|
||
"overrideCommand": false,
|
||
"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": {
|
||
"source.organizeImports": "always"
|
||
},
|
||
"editor.defaultFormatter": "charliermarsh.ruff",
|
||
"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",
|
||
"charliermarsh.ruff",
|
||
// 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"
|
||
}
|