|
1 | 1 | // For format details, see https://aka.ms/devcontainer.json. For config options, see the |
2 | 2 | // README at: https://github.com/devcontainers/templates/tree/main/src/docker-existing-docker-compose |
3 | 3 | { |
| 4 | +<<<<<<< before updating |
4 | 5 | "name": "DANDI Archive Django", |
5 | 6 | "dockerComposeFile": [ |
6 | 7 | "../docker-compose.yml", |
|
78 | 79 | "--all-extras", |
79 | 80 | "--all-groups" |
80 | 81 | ] |
| 82 | +======= |
| 83 | + "name": "DANDI Archive", |
| 84 | + "dockerComposeFile": [ |
| 85 | + "../docker-compose.yml", |
| 86 | + "../docker-compose.override.yml", |
| 87 | + "./docker-compose.devcontainer.yml" |
| 88 | + ], |
| 89 | + "service": "django", |
| 90 | + "overrideCommand": true, |
| 91 | + // The "vscode" user and remoteUser are set by the base image label (devcontainers/base). |
| 92 | + "workspaceFolder": "/home/vscode/dandiapi", |
| 93 | + "features": { |
| 94 | + "ghcr.io/devcontainers/features/git-lfs:1": {}, |
| 95 | + "ghcr.io/devcontainers/features/node:2": { |
| 96 | + "version": "24", |
| 97 | + // Work around https://github.com/devcontainers/features/pull/1625 |
| 98 | + "pnpmVersion": "none" |
| 99 | + }, |
| 100 | + "ghcr.io/rails/devcontainer/features/postgres-client:1": { |
| 101 | + "version": 18 |
| 102 | + }, |
| 103 | + "ghcr.io/devcontainers/features/terraform:1": {}, |
| 104 | + "ghcr.io/devcontainers/features/aws-cli:1": {}, |
| 105 | + "ghcr.io/devcontainers/features/github-cli:1": {}, |
| 106 | + "ghcr.io/devcontainers-extra/features/heroku-cli:1": {} |
| 107 | + }, |
| 108 | + "customizations": { |
| 109 | + "vscode": { |
| 110 | + "extensions": [ |
| 111 | + // Python |
| 112 | + "ms-python.python", |
| 113 | + "ms-python.vscode-pylance", |
| 114 | + "ms-python.debugpy", |
| 115 | + "ms-python.mypy-type-checker", |
| 116 | + "charliermarsh.ruff", |
| 117 | + // Django |
| 118 | + "batisteo.vscode-django", |
| 119 | + "augustocdias.tasks-shell-input", |
| 120 | + // Other file formats |
| 121 | + "editorconfig.editorconfig", |
| 122 | + "mikestead.dotenv", |
| 123 | + "tamasfe.even-better-toml", |
| 124 | + "timonwong.shellcheck", |
| 125 | + // Infrastructure |
| 126 | + "ms-azuretools.vscode-containers", |
| 127 | + "hashicorp.terraform", |
| 128 | + "github.vscode-github-actions", |
| 129 | + // Remove AWS extension, as only the CLI is wanted; see: https://github.com/devcontainers/features/issues/1228 |
| 130 | + "-AmazonWebServices.aws-toolkit-vscode" |
| 131 | + ], |
| 132 | + "settings": { |
| 133 | + "containers.containerClient": "com.microsoft.visualstudio.containers.docker", |
| 134 | + // Container-specific Python paths |
| 135 | + "python.defaultInterpreterPath": "/home/vscode/venv/bin/python", |
| 136 | + // Disable automatic Python venv activation in new terminals. |
| 137 | + "python-envs.terminal.autoActivationType": "off", |
| 138 | + // Ensure that `envFile` from any user settings is ignored; Docker Compose provides it. |
| 139 | + "python.envFile": "", |
| 140 | + // Reduce file watcher overhead for generated/cache directories. |
| 141 | + "files.watcherExclude": { |
| 142 | + "**/__pycache__/**": true, |
| 143 | + "**/.pytest_cache/**": true, |
| 144 | + "**/node_modules/**": true |
| 145 | + } |
| 146 | + } |
| 147 | + } |
| 148 | + }, |
| 149 | + // Prevent a prompt every time the debugger opens a port or Django auto-restarts. |
| 150 | + "otherPortsAttributes": { |
| 151 | + "onAutoForward": "silent" |
| 152 | + }, |
| 153 | + "portsAttributes": { |
| 154 | + "8000": { |
| 155 | + "label": "Django", |
| 156 | + // Show a dialog if the port isn't free. |
| 157 | + "requireLocalPort": true, |
| 158 | + "onAutoForward": "silent" |
| 159 | + } |
| 160 | + }, |
| 161 | + // Install a global Python and create a venv before VSCode extensions start, |
| 162 | + // to prevent prompts and ensure test discovery works on first load. |
| 163 | + "onCreateCommand": { |
| 164 | + "python": ["uv", "python", "install", "--default"], |
| 165 | + "venv": ["uv", "sync", "--all-extras", "--all-groups"] |
| 166 | + }, |
| 167 | + // Ensure it is re-synced on restarts. |
| 168 | + "updateContentCommand": { |
| 169 | + "venv": ["uv", "sync", "--all-extras", "--all-groups"] |
| 170 | + } |
| 171 | +>>>>>>> after updating |
81 | 172 | } |
0 commit comments