Files
superset2/.devcontainer/devcontainer.json
Maxime Beauchemin a007b3020d fix: Refactor devcontainer to use base Ubuntu with Docker-in-Docker
- Switch from docker-compose service to base Ubuntu container
- Add Docker-in-Docker to run docker-compose inside Codespace
- This provides git access and full dev environment
- Superset services run via docker-compose from within the container
2025-07-29 11:19:55 -07:00

96 lines
2.6 KiB
JSON

{
"name": "Apache Superset Development",
"image": "mcr.microsoft.com/devcontainers/base:ubuntu",
"workspaceFolder": "/workspaces/${localWorkspaceFolderBasename}",
// Forward ports for development
"forwardPorts": [9001, 8088],
"portsAttributes": {
"9001": {
"label": "Superset Frontend",
"onAutoForward": "notify"
},
"8088": {
"label": "Superset Backend API",
"onAutoForward": "silent"
}
},
// VS Code extensions for Superset development
"customizations": {
"vscode": {
"extensions": [
"ms-python.python",
"ms-python.vscode-pylance",
"ms-python.black-formatter",
"charliermarsh.ruff",
"dbaeumer.vscode-eslint",
"esbenp.prettier-vscode",
"ms-vscode.vscode-typescript-tslint-plugin",
"eamodio.gitlens",
"github.copilot",
"ms-azuretools.vscode-docker"
],
"settings": {
"python.defaultInterpreterPath": "/usr/local/bin/python",
"python.linting.enabled": true,
"python.linting.pylintEnabled": false,
"python.formatting.provider": "black",
"editor.formatOnSave": true,
"editor.codeActionsOnSave": {
"source.fixAll.eslint": true
},
"[python]": {
"editor.defaultFormatter": "ms-python.black-formatter"
},
"[typescript]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[typescriptreact]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
}
}
}
},
// Environment variables for development
"remoteEnv": {
"FLASK_ENV": "development",
"SUPERSET_ENV": "development",
"CYPRESS_CACHE_FOLDER": "/tmp/cypress_cache",
"FLASK_DEBUG": "1"
},
// Run commands after container is created
"postCreateCommand": "chmod +x .devcontainer/setup-dev.sh && .devcontainer/setup-dev.sh",
// Auto-start Superset on Codespace resume
"postStartCommand": ".devcontainer/start-superset.sh",
// Features to add to the dev container
"features": {
"ghcr.io/devcontainers/features/docker-in-docker:2": {
"moby": true,
"installDockerBuildx": true,
"dockerDashComposeVersion": "v2"
},
"ghcr.io/devcontainers/features/github-cli:1": {},
"ghcr.io/devcontainers/features/python:1": {
"version": "3.10"
},
"ghcr.io/devcontainers/features/node:1": {
"version": "18"
},
"ghcr.io/devcontainers/features/sshd:1": {
"version": "latest"
}
},
// Memory and CPU (Codespaces will provision accordingly)
"hostRequirements": {
"cpus": 4,
"memory": "8gb",
"storage": "32gb"
}
}