From 94239bfda381b51d8a5670d76136356bdc75e8c8 Mon Sep 17 00:00:00 2001 From: Danang Date: Fri, 6 Dec 2024 09:58:12 +0000 Subject: [PATCH] update devcontainer configs (#26) --- .devcontainer/devcontainer.json | 21 ++++++++++++------- .vscode/settings.json | 7 +++++++ .../docker-compose.override.devcontainer.yml | 1 + 3 files changed, 21 insertions(+), 8 deletions(-) create mode 100644 .vscode/settings.json diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index 1edbfb8..27c2062 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -7,13 +7,8 @@ "../deployment/docker-compose.override.devcontainer.yml" ], "service": "dev", + "runServices": ["db", "redis", "worker", "dev"], "workspaceFolder": "/home/web/project", - "settings": { - "terminal.integrated.shell.linux": "/bin/bash", - "python.pythonPath": "/usr/local/bin/python", - "python.linting.pylintEnabled": true, - "python.linting.enabled": true - }, "runArgs": [ "--env-file", "../deployment/.env" @@ -25,6 +20,16 @@ } }, "forwardPorts": [8000, 9000], - "extensions": ["ms-python.python", "ms-azuretools.vscode-docker"], - "shutdownAction": "stopCompose" + "shutdownAction": "stopCompose", + "customizations": { + "vscode": { + "extensions": ["ms-python.python", "ms-azuretools.vscode-docker", "njpwerner.autodocstring"], + "settings": { + "terminal.integrated.shell.linux": "/bin/bash", + "python.pythonPath": "/usr/local/bin/python", + "python.linting.pylintEnabled": true, + "python.linting.enabled": true + } + } + } } \ No newline at end of file diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 0000000..e7c089f --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,7 @@ +{ + "python.testing.pytestArgs": [ + "django_project" + ], + "python.testing.unittestEnabled": false, + "python.testing.pytestEnabled": true +} \ No newline at end of file diff --git a/deployment/docker-compose.override.devcontainer.yml b/deployment/docker-compose.override.devcontainer.yml index d1db746..a74990f 100644 --- a/deployment/docker-compose.override.devcontainer.yml +++ b/deployment/docker-compose.override.devcontainer.yml @@ -17,6 +17,7 @@ services: target: vscode volumes: - ../:/home/web/project + - ../django_project:/home/web/django_project - ./volumes/static:/home/web/static - ./volumes/media:/home/web/media