-
Notifications
You must be signed in to change notification settings - Fork 0
chore: add GitHub Codespaces devcontainer configuration #2
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,54 @@ | ||
| FROM mcr.microsoft.com/devcontainers/base:debian-12 | ||
|
|
||
| # ── System dependencies ─────────────────────────────────────────────────────── | ||
| RUN apt-get update && apt-get install -y --no-install-recommends \ | ||
| ca-certificates \ | ||
| curl \ | ||
| unzip \ | ||
| git \ | ||
| ffmpeg \ | ||
| chromium \ | ||
| libgbm1 \ | ||
| libnss3 \ | ||
| libatk-bridge2.0-0 \ | ||
| libdrm2 \ | ||
| libxcomposite1 \ | ||
| libxdamage1 \ | ||
| libxrandr2 \ | ||
| libcups2 \ | ||
| libasound2 \ | ||
| libpangocairo-1.0-0 \ | ||
| libxshmfence1 \ | ||
| libgtk-3-0 \ | ||
| # Font support — matches production rendering environment | ||
| fonts-liberation \ | ||
| fonts-noto-color-emoji \ | ||
| fonts-noto-cjk \ | ||
| fonts-noto-core \ | ||
| fonts-noto-extra \ | ||
| fonts-noto-ui-core \ | ||
| fonts-freefont-ttf \ | ||
| fonts-dejavu-core \ | ||
| fontconfig \ | ||
| && rm -rf /var/lib/apt/lists/* \ | ||
| && apt-get clean \ | ||
| && fc-cache -fv | ||
|
|
||
| # ── Node.js 22 ──────────────────────────────────────────────────────────────── | ||
| RUN curl -fsSL https://deb.nodesource.com/setup_22.x | bash - \ | ||
| && apt-get install -y --no-install-recommends nodejs \ | ||
| && rm -rf /var/lib/apt/lists/* | ||
|
|
||
| # ── Bun ────────────────────────────────────────────────────────────────────── | ||
| RUN curl -fsSL https://bun.sh/install | bash | ||
| ENV PATH="/root/.bun/bin:/home/vscode/.bun/bin:$PATH" | ||
|
|
||
| # Install bun for the vscode user as well | ||
| RUN su vscode -c "curl -fsSL https://bun.sh/install | bash" \ | ||
| && su vscode -c "~/.bun/bin/bun --version" \ | ||
| && echo "bun installed for vscode user" | ||
|
|
||
| # ── Puppeteer / Chromium config ─────────────────────────────────────────────── | ||
| ENV PUPPETEER_SKIP_CHROMIUM_DOWNLOAD=true | ||
| ENV PUPPETEER_EXECUTABLE_PATH=/usr/bin/chromium | ||
| ENV CONTAINER=true | ||
|
Comment on lines
+51
to
+54
|
||
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
| @@ -0,0 +1,94 @@ | ||||||
| { | ||||||
| "name": "Hyperframes", | ||||||
| "build": { | ||||||
| "dockerfile": "Dockerfile", | ||||||
| "context": ".." | ||||||
| }, | ||||||
|
|
||||||
| // ── Container settings ─────────────────────────────────────────────────── | ||||||
| "remoteUser": "vscode", | ||||||
| "containerEnv": { | ||||||
| "PUPPETEER_SKIP_CHROMIUM_DOWNLOAD": "true", | ||||||
| "PUPPETEER_EXECUTABLE_PATH": "/usr/bin/chromium", | ||||||
| "CONTAINER": "true" | ||||||
| }, | ||||||
|
|
||||||
| // ── VS Code extensions ─────────────────────────────────────────────────── | ||||||
| "customizations": { | ||||||
| "vscode": { | ||||||
| "extensions": [ | ||||||
| // Linting & formatting — oxlint + oxfmt (project standard) | ||||||
| "oxc.oxc-vscode", | ||||||
|
|
||||||
| // Editor experience | ||||||
| "EditorConfig.EditorConfig", | ||||||
| "streetsidesoftware.code-spell-checker", | ||||||
| "usernamehw.errorlens", | ||||||
|
|
||||||
| // Git | ||||||
| "eamodio.gitlens", | ||||||
| "mhutchie.git-graph", | ||||||
|
|
||||||
| // HTML / CSS | ||||||
| "bradlc.vscode-tailwindcss", | ||||||
| "formulahendry.auto-close-tag", | ||||||
| "naumovs.color-highlight", | ||||||
|
|
||||||
| // Markdown & docs | ||||||
| "yzhang.markdown-all-in-one", | ||||||
| "davidanson.vscode-markdownlint", | ||||||
|
|
||||||
| // Misc tooling | ||||||
| "mikestead.dotenv", | ||||||
| "ms-vscode.live-server" | ||||||
| ], | ||||||
| "settings": { | ||||||
| // Use bun as the npm script runner | ||||||
| "npm.packageManager": "bun", | ||||||
|
|
||||||
| // Format on save | ||||||
| "editor.formatOnSave": true, | ||||||
| "editor.defaultFormatter": "oxc.oxc-vscode", | ||||||
|
|
||||||
| // TypeScript | ||||||
| "typescript.tsdk": "node_modules/typescript/lib", | ||||||
| "typescript.enablePromptUseWorkspaceTsdk": true, | ||||||
|
|
||||||
| // Trim trailing whitespace / insert final newline — matches .editorconfig | ||||||
| "files.trimTrailingWhitespace": true, | ||||||
| "files.insertFinalNewline": true, | ||||||
|
|
||||||
| // Search exclusions | ||||||
| "search.exclude": { | ||||||
| "**/node_modules": true, | ||||||
| "**/dist": true, | ||||||
| "**/.git": true, | ||||||
| "**/bun.lock": true | ||||||
| } | ||||||
| } | ||||||
| } | ||||||
| }, | ||||||
|
|
||||||
| // ── Lifecycle hooks ────────────────────────────────────────────────────── | ||||||
|
|
||||||
| // Install dependencies after the container is created | ||||||
| "postCreateCommand": "bun install", | ||||||
|
|
||||||
| // Build all packages and start the studio after each start | ||||||
|
||||||
| // Build all packages and start the studio after each start | |
| // Build all packages after each start |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The Bun install step doesn’t actually enforce a specific Bun version:
~/.bun/bin/bun --versiononly prints the version, and there’s no pinned version/expected value. For reproducible devcontainers, consider pinning Bun via an env var/arg (orBUN_VERSION) and failing the build if the installed version doesn’t match.