Add dev container config to ease setup for remote development

This commit is contained in:
Debanjum
2025-05-19 19:23:57 -07:00
parent fdb681ca0e
commit e2c1b1fcd3

View File

@@ -0,0 +1,56 @@
{
"name": "Khoj Development Environment",
"image": "mcr.microsoft.com/devcontainers/python:3.10",
"forwardPorts": [
42110
],
"containerEnv": {
"USE_EMBEDDED_DB": "True"
},
"customizations": {
"vscode": {
"extensions": [
"ms-python.python",
"ms-python.vscode-pylance",
"ms-python.black-formatter",
"ms-python.mypy-type-checker",
"ms-python.isort",
"esbenp.prettier-vscode",
"GitHub.copilot",
"GitHub.copilot-chat",
"GitHub.vscode-pull-request-github",
"github.vscode-github-actions",
"unifiedjs.vscode-mdx"
],
"settings": {
"python.defaultInterpreterPath": "/workspace/.venv/bin/python",
"python.formatting.provider": "black",
"python.linting.enabled": true,
"python.linting.mypyEnabled": true,
"python.linting.mypyArgs": [
"--config-file=pyproject.toml"
],
"mypy.configFile": "pyproject.toml",
"isort.args": [
"--profile",
"black",
"--filter-files"
]
}
}
},
"postCreateCommand": "scripts/dev_setup.sh",
"features": {
"ghcr.io/devcontainers-contrib/features/black:2": {},
"ghcr.io/devcontainers-contrib/features/mypy:2": {},
"ghcr.io/devcontainers-contrib/features/isort:2": {},
"ghcr.io/devcontainers-contrib/features/pre-commit:2": {},
"ghcr.io/devcontainers/features/github-cli:1": {},
"ghcr.io/devcontainers/features/node:1": {
"version": "lts",
"installYarnUsingApt": false,
"nodeGypDependencies": true
}
},
"remoteUser": "vscode"
}