mq-quiz / .devcontainer /devcontainer.json
Pamela Fox
Update devcontainer.json
1c96b17
raw
history blame contribute delete
2.11 kB
{
"name": "django-quiz-app",
"dockerComposeFile": "docker-compose.yml",
"service": "app",
"workspaceFolder": "/workspace",
"features": {
"ghcr.io/azure/azure-dev/azd:latest": {}
},
"forwardPorts": [8000, 5432],
"portsAttributes": {
"8000": {"label": "Django port", "onAutoForward": "notify"},
"5432": {"label": "PostgreSQL port", "onAutoForward": "silent"}
},
// Configure tool-specific properties.
"customizations": {
// Configure properties specific to VS Code.
"vscode": {
// Set *default* container specific settings.json values on container create.
"settings": {
"sqltools.connections": [
{
"name": "Container database",
"driver": "PostgreSQL",
"previewLimit": 50,
"server": "localhost",
"port": 5432,
"database": "app",
"username": "app_user",
"password": "app_password"
}
],
"taskExplorer.enabledTasks": {"python": false},
"python.defaultInterpreterPath": "/usr/local/bin/python",
"python.linting.enabled": true,
"python.testing.pytestEnabled": true,
"python.testing.unittestEnabled": false,
"[python]": {
"editor.formatOnSave": true,
"editor.codeActionsOnSave": {
"source.fixAll": "explicit"
},
"editor.defaultFormatter": "ms-python.black-formatter"
},
"python.formatting.provider": "black",
"files.exclude": {
"**/*.coverage": true,
".ruff_cache": true,
".pytest_cache": true
}
},
// Add the IDs of extensions you want installed when the container is created.
"extensions": [
"ms-python.python",
"ms-python.vscode-pylance",
"ms-python.black-formatter",
"charliermarsh.ruff",
"ms-azuretools.vscode-bicep",
"mtxr.sqltools",
"mtxr.sqltools-driver-pg",
"spmeesseman.vscode-taskexplorer"
]
}
},
// Use 'postCreateCommand' to run commands after the container is created.
"postCreateCommand": "pip install -r requirements-dev.txt && pre-commit install",
// Comment out to connect as root instead. More info: https://aka.ms/vscode-remote/containers/non-root.
"remoteUser": "vscode"
}