Skip to content

feat(devtooling): local chain, debug configs and resource controls in devcontainer (#238) - #1001

Merged
Smartdevs17 merged 1 commit into
Smartdevs17:mainfrom
sandrawillow001-afk:feat/devcontainer-local-env-238
Sep 30, 2026
Merged

Smartdevs17 merged 1 commit into
Smartdevs17:mainfrom
sandrawillow001-afk:feat/devcontainer-local-env-238

Conversation

@sandrawillow001-afk

@sandrawillow001-afk sandrawillow001-afk commented Sep 29, 2026 •

Copy link
Copy Markdown
Contributor

Coordination note. Issue #238 is currently assigned to @tabithaglitch. This PR implements the same subject matter; please coordinate with them before merging so the effort is not duplicated.

Closes #238.

What already existed

.devcontainer/ already provided the devcontainer itself, Postgres, Redis, port forwarding, volume persistence for those two services and a one-command scripts/devcontainer.sh.

Gaps closed

Criterion Before Now
Local blockchain node None stellar service (stellar/stellar-quickstart, local mode, mirroring docker-compose.sandbox.yml) started by default, plus an opt-in evm Hardhat service behind the evm profile
Debug configuration None Tracked templates in .devcontainer/vscode/ installed into .vscode/ by post-create.sh: backend (tsx watch + inspector on 9229), backend without watch, current test file, Next.js, Soroban cargo test, attach mode, and a full-stack compound; plus stack/chain tasks
Resource allocation controls None CPU/memory limits and reservations on every service, env-overridable (DEV_POSTGRES_MEMORY, DEV_STELLAR_CPUS, …), plus hostRequirements so an under-resourced host fails fast
Volume persistence Only Postgres/Redis/node_modules Adds stellar-data (ledger state survives restarts), hardhat-cache and contract-target (Rust build cache)
Edge cases — Apple Silicon documented: stellar/postgres/redis are arm64-native, EVM node defaults to linux/amd64 with DEV_EVM_PLATFORM override

.vscode/ is gitignored, so the debug configs live as tracked templates and are copied in on create; existing user files are never overwritten.

Verification

docker compose -f .devcontainer/docker-compose.yml config --quiet                 # valid
docker compose -f .devcontainer/docker-compose.yml --profile app --profile evm config --quiet
python3 -c "import json; json.load(open('.devcontainer/devcontainer.json'))"      # valid
bash -n scripts/devcontainer.sh .devcontainer/post-create.sh .devcontainer/post-start.sh

Resource limits resolve as expected (e.g. stellar → cpus: 2, memory: 2147483648).


🤖 Generated with Codebuff

… devcontainer (Smartdevs17#238)

The devcontainer covered Postgres and Redis but not the rest of the acceptance
criteria: there was no local blockchain node, no debug configuration, no
resource allocation controls, and chain state was lost on every restart.

- docker-compose: add a `stellar` service (stellar-quickstart in local mode,
  mirroring docker-compose.sandbox.yml) and an opt-in `evm` Hardhat service;
  expose CPU/memory limits and reservations for every service, overridable via
  DEV_*_CPUS / DEV_*_MEMORY.
- volumes: persist ledger state (`stellar-data`), Hardhat cache and the Rust
  contract build cache so deploys survive a restart.
- devcontainer.json: forward the chain and debugger ports with labels, export
  STELLAR_RPC_URL / SOROBAN_RPC_URL / EVM_RPC_URL, and declare hostRequirements
  so an under-resourced host fails fast.
- debug configs: tracked templates in .devcontainer/vscode/ (the .vscode
  directory is gitignored) installed on create, covering backend (tsx +
  inspector 9229), frontend, current test file, Soroban tests, attach mode and
  a full-stack compound, plus stack/chain tasks.
- scripts/devcontainer.sh: add `infra`, `stellar`, `evm` and a guarded `reset`.
- docs: document nodes, debug configs, resource knobs and volumes.

🤖 Generated with Codebuff
Co-Authored-By: Codebuff <noreply@codebuff.com>
@vercel

vercel Bot commented Sep 29, 2026

Copy link
Copy Markdown

@sandrawillow001-afk is attempting to deploy a commit to the smartdevs17's projects Team on Vercel.

A member of the Team first needs to authorize it.

@Smartdevs17
Smartdevs17 merged commit 81076d8 into Smartdevs17:main Sep 30, 2026
23 of 37 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

DevTooling: Implement Local Development Environment with Devcontainers

2 participants