Add dev container configuration for local dev, Codespaces, and Claude Code - #1739
Open
abkfenris wants to merge 1 commit into
Open
Add dev container configuration for local dev, Codespaces, and Claude Code#1739abkfenris wants to merge 1 commit into
abkfenris wants to merge 1 commit into
Conversation
… Code Introduce a Dev Containers spec setup under .devcontainer/ so the project can be opened one-click in VS Code, GitHub Codespaces, or any spec-compatible editor, with Claude Code preinstalled. To keep things DRY, service definitions are shared through a new docker-compose.base.yaml that both the main stack and the dev container extend via the compose `extends:` keyword, and the dev container image is a new `devcontainer` stage in the existing app/Dockerfile rather than a duplicate Dockerfile. - app/Dockerfile: split into base / devcontainer / production stages; the production stage stays last so the default build target (test compose and `make build`) is unchanged. The devcontainer stage adds a non-root `vscode` user and interactive tooling. - docker-compose.base.yaml: shared db, cache, and app (build) definitions. - docker-compose.yaml: refactored to extend the base; strictly behavior-preserving (verified with `docker compose config`). - .devcontainer/: devcontainer.json (Claude Code feature, VS Code extensions, forwarded ports), docker-compose.yml (extends base, inline dev env, Postgres persisted to a docker-data/devcontainer-db bind mount), and an idempotent post-create.sh that runs uv sync, migrations, fixture seeding, and default superuser creation, skipping seed steps when the DB is already populated. - .gitignore / Readme.md: ignore the dev container DB dir and document the workflow. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01SerCd5rRLrU1TsU8AHCXXQ
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Introduce a Dev Containers spec setup under .devcontainer/ so the project can
be opened one-click in VS Code, GitHub Codespaces, or any spec-compatible
editor, with Claude Code preinstalled.
To keep things DRY, service definitions are shared through a new
docker-compose.base.yaml that both the main stack and the dev container extend
via the compose
extends:keyword, and the dev container image is a newdevcontainerstage in the existing app/Dockerfile rather than a duplicateDockerfile.
production stage stays last so the default build target (test compose and
make build) is unchanged. The devcontainer stage adds a non-rootvscodeuser and interactive tooling.
behavior-preserving (verified with
docker compose config).forwarded ports), docker-compose.yml (extends base, inline dev env, Postgres
persisted to a docker-data/devcontainer-db bind mount), and an idempotent
post-create.sh that runs uv sync, migrations, fixture seeding, and default
superuser creation, skipping seed steps when the DB is already populated.
workflow.
Co-Authored-By: Claude Opus 4.8 noreply@anthropic.com
Claude-Session: https://claude.ai/code/session_01SerCd5rRLrU1TsU8AHCXXQ