Skip to content
Open
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
16 changes: 14 additions & 2 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,22 @@
"ghcr.io/devcontainers/features/azure-cli:1": {},
"ghcr.io/devcontainers/features/powershell:2": {},
"ghcr.io/devcontainers/features/github-cli:1": {},
"ghcr.io/devcontainers/features/copilot-cli:1": {}
"ghcr.io/devcontainers/features/copilot-cli:1": {},
"ghcr.io/devcontainers/features/node:2.0.0": {
"version": "25"
}
},

"onCreateCommand": "bash .devcontainer/post-create.sh",

"forwardPorts": [3333],
"portsAttributes": {
"3333": {
"label": "Docs Site",
"onAutoForward": "notify"
}
},

"customizations": {
"vscode": {
"extensions": [
Expand All @@ -30,7 +41,8 @@
],
"settings": {
"azureMcp.serverMode": "namespace",
"azureMcp.readOnly": false
"azureMcp.readOnly": false,
"task.allowAutomaticTasks": "on"
}
}
},
Expand Down
17 changes: 17 additions & 0 deletions .devcontainer/post-create.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,14 @@ set -euo pipefail
# Codespaces prebuilds. The three installs below are independent, so we
# run them in parallel and skip work that has already been done.

echo "==> Ensuring sandbox dependencies are installed..."
if command -v bwrap >/dev/null 2>&1 && command -v socat >/dev/null 2>&1; then
echo "bubblewrap and socat already installed, skipping"
else
sudo apt-get update
sudo DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends bubblewrap socat
fi

echo "==> Installing IaC security tools (parallel)..."

log_dir="$(mktemp -d)"
Expand Down Expand Up @@ -73,4 +81,13 @@ if [ "$status" -ne 0 ]; then
exit "$status"
fi

# Install Docusaurus website dependencies
echo "==> Installing website dependencies..."
if [ -f website/package.json ]; then
(cd website && npm install --no-audit --no-fund)
echo "==> Website dependencies installed"
else
echo "==> website/package.json not found, skipping"
fi

echo "==> Dev environment ready"
63 changes: 63 additions & 0 deletions .vscode/tasks.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
{
"version": "2.0.0",
"tasks": [
{
"label": "Docs: Install",
"type": "shell",
"command": "npm install",
"options": { "cwd": "${workspaceFolder}/website" },
"group": "build",
"problemMatcher": []
},
{
"label": "Docs: Generate",
"type": "shell",
"command": "node scripts/generate-docs.js",
"options": { "cwd": "${workspaceFolder}" },
"group": "build",
"problemMatcher": [],
"dependsOn": "Docs: Install"
},
{
"label": "Docs: Build (local)",
"type": "shell",
"command": "npm run build",
"options": {
"cwd": "${workspaceFolder}/website",
"env": { "DOCUSAURUS_BASE_URL": "/" }
},
"group": "build",
"problemMatcher": [],
"dependsOn": "Docs: Generate"
},
{
"label": "Docs: Build (production)",
"type": "shell",
"command": "npm run build",
"options": { "cwd": "${workspaceFolder}/website" },
"group": "build",
"problemMatcher": [],
"dependsOn": "Docs: Generate"
},
{
"label": "Docs: Serve",
"type": "shell",
"command": "npm run serve -- --port 3333 --no-open",
"options": { "cwd": "${workspaceFolder}/website" },
"group": "test",
"isBackground": true,
"problemMatcher": [],
"dependsOn": "Docs: Build (local)"
},
{
"label": "Docs: Dev Server",
"type": "shell",
"command": "npm start -- --port 3333 --no-open",
"options": { "cwd": "${workspaceFolder}/website" },
"group": "test",
"isBackground": true,
"problemMatcher": [],
"dependsOn": "Docs: Install"
}
]
}