Skip to content

feat: Add optional localhost access for local development#1419

Merged
cristiam86 merged 2 commits intomainfrom
feat/localhost-dev-access
Mar 16, 2026
Merged

feat: Add optional localhost access for local development#1419
cristiam86 merged 2 commits intomainfrom
feat/localhost-dev-access

Conversation

@MuncleUscles
Copy link
Copy Markdown
Member

@MuncleUscles MuncleUscles commented Feb 4, 2026

Summary

Enables developers to allow GenLayer contracts to make HTTP requests to localhost and internal hosts (e.g., local Anvil/Hardhat nodes) during local development.

Key design decisions:

  • Default behavior remains production-safe (no localhost access)
  • Local dev requires explicit opt-in by copying the example file
  • Uses standard Docker Compose override pattern (no wrapper scripts needed)
  • Cross-platform support via extra_hosts for Linux compatibility

Usage

cp docker-compose.override.yml.example docker-compose.override.yml
docker compose up -d

Files

  • docker-compose.override.yml.example - Template showing how to enable localhost access
  • config-overrides.example/genvm-module-web.yaml - GenVM config with always_allow_hosts populated
  • .gitignore - Excludes user's local override files from version control

Test plan

  • Verified GenLayer contracts can reach host.docker.internal:8545 (Anvil) after copying override
  • Verified default behavior (no override file) blocks localhost access

Summary by CodeRabbit

Release Notes

  • Chores
    • Added example configuration files to facilitate local development environment setup
    • Updated .gitignore to exclude local development override files from version control

Enables developers to allow GenLayer contracts to make HTTP requests
to localhost and internal hosts (e.g., local Anvil/Hardhat nodes).

Usage:
  cp docker-compose.override.yml.example docker-compose.override.yml
  docker compose up -d

Default behavior remains production-safe (no localhost access).
Local dev requires explicit opt-in by copying the example file.
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Feb 4, 2026

📝 Walkthrough

Walkthrough

Three new configuration example files and updated .gitignore entries are introduced to support local development workflows. These additions provide templates for docker-compose overrides and GenVM module configuration, while marking override directories for git exclusion.

Changes

Cohort / File(s) Summary
Local Development Configuration Examples
docker-compose.override.yml.example, config-overrides.example/genvm-module-web.yaml
Example configuration files for local development setup. Docker Compose override defines service volume mounts and host networking (via extra_hosts). GenVM Web Module config specifies localhost networking, Firefox headless session, VM/Lua paths, signer settings, and always-allowed hosts.
Gitignore Updates
.gitignore
Added exclusions for docker-compose.override.yml and config-overrides/ directory to prevent local override files from being version controlled.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Poem

🐰 Local configs now have a home,
No more versioned override roam,
Examples bright for docker's ways,
GenVM Web through headless maze,
Dev machines rejoice and play! 🎉

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely describes the main change: adding optional localhost access for local development, which accurately reflects the purpose of the changeset.
Description check ✅ Passed The description provides good context but lacks some template sections like 'Fixes #issue-number', 'Decisions made', and 'Reviewing tips'; however, it covers the essential information about what changed and why.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch feat/localhost-dev-access

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.

@cristiam86 cristiam86 merged commit 2564eb4 into main Mar 16, 2026
6 of 7 checks passed
@github-actions
Copy link
Copy Markdown
Contributor

🎉 This PR is included in version 0.111.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants