-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
184a953
commit 34abb7c
Showing
4 changed files
with
134 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
{ | ||
"name": "Django Docker Environment", | ||
"remoteUser": "vscode", | ||
"postCreateCommand": "git config --global --add safe.directory /home/web/project", | ||
"dockerComposeFile": [ | ||
"../deployment/docker-compose.yml", | ||
"../deployment/docker-compose.override.devcontainer.yml" | ||
], | ||
"service": "dev", | ||
"runServices": ["db", "redis", "worker", "dev"], | ||
"workspaceFolder": "/home/web/project", | ||
"runArgs": [ | ||
"--env-file", | ||
"../deployment/.env" | ||
], | ||
"portsAttributes": { | ||
"9000": { | ||
"label": "Frontend", | ||
"onAutoForward": "notify" | ||
} | ||
}, | ||
"forwardPorts": [8000, 9000], | ||
"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 | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
{ | ||
// Use IntelliSense to learn about possible attributes. | ||
// Hover to view descriptions of existing attributes. | ||
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 | ||
"version": "0.2.0", | ||
"configurations": [ | ||
{ | ||
"name": "Launch Chrome", | ||
"request": "launch", | ||
"type": "chrome", | ||
"url": "http://localhost:8000", | ||
"webRoot": "${workspaceFolder}/django_project/frontend", | ||
"sourceMapPathOverrides": { | ||
"webpack:///./src/*": "${webRoot}/*" | ||
} | ||
}, | ||
{ | ||
"name": "Django: Run server", | ||
"type": "python", | ||
"request": "launch", | ||
"program": "${workspaceFolder}/django_project/manage.py", | ||
"args": [ | ||
"runserver", "8000" | ||
], | ||
"django": true, | ||
"justMyCode": true, | ||
"env": { | ||
"DJANGO_SETTINGS_MODULE": "core.settings.dev" | ||
} | ||
}, | ||
{ | ||
"command": "npm run serve", | ||
"name": "React: Run webpack-dev-server", | ||
"request": "launch", | ||
"type": "node-terminal", | ||
"cwd": "${workspaceFolder}/django_project/frontend", | ||
}, | ||
], | ||
"compounds": [ | ||
{ | ||
"name": "Django + React", | ||
"configurations": ["Django: Run server", "React: Run webpack-dev-server"], | ||
"stopAll": true | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
{ | ||
"python.testing.pytestArgs": [ | ||
"django_project" | ||
], | ||
"python.testing.unittestEnabled": false, | ||
"python.testing.pytestEnabled": true | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
{ | ||
"version": "2.0.0", | ||
"tasks": [ | ||
{ | ||
"label": "React: Install dependencies", | ||
"type": "shell", | ||
"command": "npm install --legacy-peer-deps", | ||
"options": { | ||
"cwd": "${workspaceFolder}/django_project/frontend" | ||
}, | ||
"group": "build", | ||
"problemMatcher": [] | ||
}, | ||
{ | ||
"label": "React: Webpack-dev-server", | ||
"type": "shell", | ||
"command": "npm run serve", | ||
"port": 9000, | ||
"options": { | ||
"cwd": "${workspaceFolder}/django_project/frontend" | ||
}, | ||
"group": "build", | ||
"problemMatcher": [] | ||
}, | ||
{ | ||
"label": "Django: Migrate", | ||
"type": "shell", | ||
"command": "python manage.py migrate", | ||
"group": "build", | ||
"options": { | ||
"cwd": "${workspaceFolder}/django_project" | ||
}, | ||
"problemMatcher": [] | ||
}, | ||
{ | ||
"label": "Django: Make Migrations", | ||
"type": "shell", | ||
"command": "python manage.py makemigrations", | ||
"group": "build", | ||
"options": { | ||
"cwd": "${workspaceFolder}/django_project" | ||
}, | ||
"problemMatcher": [] | ||
}, | ||
] | ||
} |