From e2c1b1fcd3004732e19c4367e9b7655bab30b0a3 Mon Sep 17 00:00:00 2001 From: Debanjum Date: Mon, 19 May 2025 19:23:57 -0700 Subject: [PATCH] Add dev container config to ease setup for remote development --- .devcontainer/devcontainer.json | 56 +++++++++++++++++++++++++++++++++ 1 file changed, 56 insertions(+) create mode 100644 .devcontainer/devcontainer.json diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json new file mode 100644 index 00000000..52232951 --- /dev/null +++ b/.devcontainer/devcontainer.json @@ -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" +}