Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add devcontainer config #1536

Merged
merged 1 commit into from
Aug 21, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading