Skip to content

Add Dev Container #94

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Feb 24, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"name": "Docusaurus",
"image": "mcr.microsoft.com/devcontainers/typescript-node:22-bookworm",
"features": {},
"forwardPorts": [3000],
"postCreateCommand": "npm install",
"customizations": {
"vscode": {
"extensions": [
"unifiedjs.vscode-mdx",
"esbenp.prettier-vscode",
"davidanson.vscode-markdownlint",
"redhat.vscode-yaml",
"yzhang.markdown-all-in-one"
]
}
}
}
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# CodeGate docs <!-- omit in toc -->

[![GitHub deployments](https://img.shields.io/github/deployments/stacklok/codegate-docs/Production?logo=vercel&style=flat&label=Vercel%20deployment)](https://github.com/stacklok/codegate-docs/deployments/Production)

This repository contains the public-facing docs for CodeGate, hosted at
[https://docs.codegate.ai](https://docs.codegate.ai).

Expand All @@ -20,6 +22,12 @@ formatting.

## Local development

You'll need Node.js available (v22 recommended) or VS Code with the
[Dev Containers](https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.remote-containers)
extension and Docker.

[![Open in Dev Containers](https://img.shields.io/static/v1?label=Dev%20Containers&message=Open&color=blue)](https://vscode.dev/redirect?url=vscode://ms-vscode-remote.remote-containers/cloneInVolume?url=https://github.com/stacklok/codegate-docs)

```bash
npm install
npm run start
Expand Down
23 changes: 23 additions & 0 deletions docs/integrations/copilot.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -276,6 +276,29 @@ Here is an example of how to use the `requests` package:
...
```

## Troubleshooting

<details>
<summary>**Issue**: Copilot in VS Code does not work with Dev Containers</summary>

**Details:** The Copilot extensions load within the Dev Container context by
default, but the container cannot reach the CodeGate proxy directly and does not
trust the CodeGate certificate.

**Solution:** The simplest solution which doesn't require modifications to the
devcontainer configuration in your project is to force the Copilot extensions to
run in the UI context instead of remotely. Add the following to your **VS Code
User Settings** file:

```json title="settings.json"
"remote.extensionKind": {
"GitHub.copilot": ["ui"],
"GitHub.copilot-chat": ["ui"]
}
```

</details>

## Next steps

Learn more about CodeGate's features and how to use them:
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"prettier": "prettier . --check",
"prettier:fix": "prettier . --write",
"serve": "docusaurus serve",
"start": "docusaurus start",
"start": "docusaurus start --host 0.0.0.0",
"swizzle": "docusaurus swizzle",
"typecheck": "tsc",
"write-heading-ids": "docusaurus write-heading-ids",
Expand Down
Loading