Skip to content

Commit

Permalink
add devcontainer config (#1536)
Browse files Browse the repository at this point in the history
Signed-off-by: Aakash Singh <[email protected]>
  • Loading branch information
sainak authored Aug 21, 2023
1 parent 914633c commit 134a5be
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 4 deletions.
34 changes: 34 additions & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
// For format details, see https://aka.ms/devcontainer.json. For config options, see the
// README at: https://github.com/devcontainers/templates/tree/main/src/docker-existing-docker-compose
{
"name": "Care",
"dockerComposeFile": [
"../docker-compose.yaml",
"../docker-compose.local.yaml"
],
"hostRequirements": {
"cpus": 4
},
"waitFor": "onCreateCommand",
"service": "backend",
"workspaceFolder": "/workspaces/${localWorkspaceFolderBasename}",
"postCreateCommand": "python manage.py migrate && python manage.py collectstatic --noinput",
"postAttachCommand": {
"server": "python manage.py runserver"
},

"customizations": {
"vscode": {
"extensions": [
"ms-python.python"
]
}
},
"portsAttributes": {
"8000": {
"label": "Application",
"onAutoForward": "openPreview"
}
},
"forwardPorts": [9000]
}
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,6 @@ typings/
!.vscode/tasks.json
!.vscode/launch.json
!.vscode/extensions.json
.devcontainer/*

# Provided default Pycharm Run/Debug Configurations should be tracked by git
# In case of local modifications made by Pycharm, use update-index command
Expand Down
4 changes: 1 addition & 3 deletions docker-compose.local.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,14 @@ version: '3.4'
services:
db:
env_file:
- ./.env
- ./docker/.local.env

backend:
build:
context: .
dockerfile: docker/DevDockerfile
env_file:
- ./docker/.local.env
- ./.env
volumes:
- .:/app

Expand All @@ -22,7 +21,6 @@ services:
dockerfile: docker/DevDockerfile
env_file:
- ./docker/.local.env
- ./.env
entrypoint: [ "bash", "celery_dev.sh" ]
depends_on:
- db
Expand Down

0 comments on commit 134a5be

Please sign in to comment.