// For format details, see https://aka.ms/devcontainer.json. For config options, see the README at: // https://github.com/microsoft/vscode-dev-containers/tree/v0.245.0/containers/python-3 { "name": "django-quiz-app", "dockerComposeFile": "docker-compose.yml", "service": "app", "workspaceFolder": "/workspace", "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" } ], "python.defaultInterpreterPath": "/usr/local/bin/python", "python.linting.enabled": true, "python.testing.unittestEnabled": false, "python.testing.pytestEnabled": true, "[python]": { "editor.formatOnSave": true, "editor.codeActionsOnSave": { "source.fixAll": true } }, "python.formatting.provider": "black" }, // Add the IDs of extensions you want installed when the container is created. "extensions": [ "ms-azuretools.azure-dev", "ms-python.python", "ms-python.vscode-pylance", "charliermarsh.ruff", "ms-azuretools.vscode-bicep", "mtxr.sqltools", "mtxr.sqltools-driver-pg" ] } }, // 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" }