server icon indicating copy to clipboard operation
server copied to clipboard

[draft] feat: add devcontainer setup for Alkemio server with Docker

Open antst opened this issue 1 month ago β€’ 1 comments

This pull request introduces a complete development container setup for the Alkemio server stack. It adds Docker, Compose, and VS Code configuration files to streamline onboarding and local development, including preinstalled dependencies, service orchestration, and usage documentation.

Dev Container Configuration:

  • Added .devcontainer/Dockerfile to define the Node.js 20-based development environment, install essential CLI tools, and preinstall MCP servers for GitHub, Context7, and Tavily.
  • Introduced .devcontainer/devcontainer.json to orchestrate service startup, configure VS Code extensions/settings, forward key ports, and set up MCP server integrations with environment variables.
  • Added .devcontainer/docker-compose.devcontainer.yml to specify the server container build, persistent pnpm store volume, service dependencies, and network configuration.

Automation and Documentation:

  • Included .devcontainer/scripts/post-create.sh to automate pnpm setup and dependency installation on container creation.
  • Provided .devcontainer/README.md with clear instructions, environment variable requirements, and usage tips for the dev container workflow.

Summary

Schema Contract Checklist (Feature 002)

If this PR affects the GraphQL schema, complete ALL items below:

  • [ ] Ran npm run schema:print (and optionally npm run schema:sort) to regenerate schema.graphql.
  • [ ] Retrieved base snapshot (e.g. git show origin/develop:schema.graphql > tmp/prev.schema.graphql).
  • [ ] Ran npm run schema:diff to produce change-report.json and deprecations.json.
  • [ ] Reviewed classifications; only expected changes present.
  • [ ] (Optional) Ran npm run schema:validate and artifacts passed validation.
  • [ ] Committed ONLY schema.graphql (not the JSON artifacts).

Change Report Summary

Paste the key counts from change-report.json (example format below) β€” remove any zero lines if desired:

Additive: X
Deprecated: Y
Deprecation Grace: Z
Breaking: B (override applied? yes/no)
Premature Removals: P
Invalid Deprecations: I
Info: N

Deprecations Added / Updated

List new or updated deprecations with schedules (REMOVE_AFTER=YYYY-MM-DD | reason). Indicate any in grace period.

Breaking Changes (If Any)

If BREAKING changes are intentional:

  • Rationale:
  • Risk assessment / mitigation:
  • CODEOWNER approval with phrase BREAKING-APPROVED requested? (link)

Other Notes


Reference docs: specs/002-schema-contract-diffing/quickstart.md for full workflow and troubleshooting.

Summary by CodeRabbit

  • Chores

    • Added a full development container setup for a multi-service local environment.
    • Preinstalled developer tools, language runtimes, database/queue/redis clients, and package managers.
    • Configured automatic environment initialization, service startup, port forwarding, and post-create dependency install.
  • Documentation

    • Added usage notes detailing included tools, required secrets, rebuild steps, and common tips.

antst avatar Nov 13 '25 17:11 antst

Walkthrough

Adds a complete devcontainer for the TypeScript/Node Alkemio server stack: Dockerfile, Docker Compose service, VS Code devcontainer configuration, post-create initialization script, and README with usage and secret requirements.

Changes

Cohort / File(s) Summary
Devcontainer base image & tooling
.devcontainer/Dockerfile
New Dockerfile based on mcr.microsoft.com/devcontainers/typescript-node variant; installs system utilities (python3, pip, MySQL/Postgres clients, redis tools, jq, iputils-ping, netcat, git-lfs), enables corepack, configures PNPM, installs global npm packages @modelcontextprotocol/[email protected], @upstash/[email protected], and installs mcp-tavily via pip; sets PNPM_HOME and updates PATH.
Devcontainer configuration & services
.devcontainer/devcontainer.json, .devcontainer/docker-compose.devcontainer.yml
Adds devcontainer.json with multi-source Docker Compose setup, workspace and remoteUser settings, runServices list, port forwards, initialization and post-create steps, VS Code extensions, TypeScript memory limits, MCP integrations and env passthrough. Adds docker-compose.devcontainer.yml declaring server service built from .devcontainer/Dockerfile, service dependencies (traefik, mysql, postgres, rabbitmq, redis), volumes including pnpm store, network, and sleep infinity entry to keep container running.
Init script & docs
.devcontainer/scripts/post-create.sh, .devcontainer/README.md
Adds post-create.sh enabling strict Bash flags, enables Corepack, installs/activates [email protected], configures pnpm store-dir, and runs pnpm install --frozen-lockfile. Adds README.md documenting container contents, required secrets, preinstalled tools, automatic dependency install, ports, and rebuild instructions.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20–30 minutes

  • Files with higher attention:
    • .devcontainer/Dockerfile β€” verify package install flags, pip install options, and PATH/PNPM setup.
    • .devcontainer/devcontainer.json β€” confirm runServices list, forwarded ports, env passthrough, and MCP integration settings.
    • .devcontainer/docker-compose.devcontainer.yml β€” check service dependency conditions, volume mappings, and user/workingDirectory.
    • .devcontainer/scripts/post-create.sh β€” ensure pnpm version, store-dir path, and frozen-lockfile behavior match workspace expectations.

Pre-merge checks and finishing touches

βœ… Passed checks (3 passed)
Check name Status Explanation
Description Check βœ… Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check βœ… Passed The title accurately summarizes the main change: adding a devcontainer setup for the Alkemio server with Docker, which aligns with the core content of the PR (five new .devcontainer files).
Docstring Coverage βœ… Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing touches
πŸ§ͺ Generate unit tests (beta)
  • [ ] Create PR with unit tests
  • [ ] Post copyable unit tests in a comment
  • [ ] Commit unit tests in branch devcontainer

πŸ“œ Recent review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

πŸ“₯ Commits

Reviewing files that changed from the base of the PR and between a006d5af5bd3ec1e61e3a1d603feaf8618a1736d and 3de88b53182215100b83caacc4561636482ce331.

πŸ“’ Files selected for processing (1)
  • .devcontainer/devcontainer.json (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • .devcontainer/devcontainer.json

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❀️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

coderabbitai[bot] avatar Nov 13 '25 17:11 coderabbitai[bot]