devcontainer.json•2.39 kB
{
    "name": "python-3.12",
    "dockerComposeFile": [
        "./docker-compose.yml"
    ],
    "service": "python-3.12-mcp-server",
    "secrets": {
        "OPENAI_API_KEY": {
            "description": "This key is optional and only needed if you are working on OpenAI-related code. Leave it blank if not required. You can always set it later as an environment variable in the codespace terminal."
        }
    },
    "shutdownAction": "stopCompose",
    "workspaceFolder": "/workspaces/mcp-server",
    // "runArgs": [],
    "remoteEnv": {},
    "features": {
        "ghcr.io/devcontainers/features/common-utils:2": {
            "installZsh": true,
            "installOhMyZsh": true,
            "configureZshAsDefaultShell": true,
            "username": "vscode",
            "userUid": "1000",
            "userGid": "1000"
            // "upgradePackages": "true"
        },
        // "ghcr.io/devcontainers/features/python:1": {},
        // The below configuration with "version" set to "latest" fails in codespace
        // "ghcr.io/devcontainers/features/git:1": {
        //     "version": "latest",
        //     "ppa": true
        // },
        "ghcr.io/devcontainers/features/git:1": {},
        "ghcr.io/devcontainers/features/git-lfs:1": {},
        "ghcr.io/robbert229/devcontainer-features/postgresql-client:1": {}
    },
    "updateContentCommand": "bash .devcontainer/setup.sh",
    "customizations": {
        "vscode": {
            "settings": {
                "python.linting.enabled": true,
                "python.testing.pytestEnabled": true,
                "editor.formatOnSave": true,
                "editor.codeActionsOnSave": {
                    "source.organizeImports": "always"
                },
                "[python]": {
                    "editor.defaultFormatter": "ms-python.vscode-pylance"
                },
                "editor.rulers": [
                    80
                ]
            },
            "extensions": [
                "ms-python.python",
                "ms-toolsai.jupyter",
                "ms-toolsai.vscode-jupyter-cell-tags",
                "ms-toolsai.jupyter-keymap",
                "ms-toolsai.jupyter-renderers",
                "ms-toolsai.vscode-jupyter-slideshow",
                "ms-python.vscode-pylance",
                "ms-playwright.playwright"
            ]
        }
    }
}