[PR #2035] [MERGED] 2034 automate port forwarding for GitHub codespaces using gh cli #3861

Closed
opened 2026-02-22 18:34:39 -05:00 by yindo · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/Mintplex-Labs/anything-llm/pull/2035
Author: @MrSimonC
Created: 8/2/2024
Status: Merged
Merged: 8/5/2024
Merged by: @timothycarambat

Base: masterHead: 2034-automate-port-forwarding-for-github-codespaces-using-gh-cli


📝 Commits (9)

  • f3ed3bf open the server port to public on container post create
  • 5ffe750 install gh on container start
  • 3d9cdf6 remove port command until needed
  • e363da9 look for port 3001 to be available and make public
  • 7f46589 install netcat
  • 254d6e9 run background nc task before server start
  • 5536e92 add sleep 5 due to error clashing with server start
  • a030291 remove netcat, use gh cli
  • b68528c Merge branch 'Mintplex-Labs:master' into 2034-automate-port-forwarding-for-github-codespaces-using-gh-cli

📊 Changes

2 files changed (+4 additions, -4 deletions)

View changed files

📝 .devcontainer/devcontainer.json (+3 -3)
📝 .vscode/tasks.json (+1 -1)

📄 Description

Pull Request Type

  • feat
  • 🐛 fix
  • ♻️ refactor
  • 💄 style
  • 🔨 chore
  • 📝 docs

Relevant Issues

resolves #2034

What is in this change?

This pull request introduces an automation for port forwarding in GitHub Codespaces using the gh CLI tool. Specifically, it updates the devcontainer.json to install the gh CLI tool and modifies the tasks.json file to poll the port until it’s redirected and apply the public property using the gh CLI. This change simplifies the development experience for GitHub Codespaces users by automating the port forwarding process.

Additional Information

This change is a follow-up to the existing documentation in the .devcontainer/README.md file, which mentions the need to manually set the port visibility to “Public” when running the server for the first time in GitHub Codespaces. This automation eliminates the need for manual configuration and improves the reliability and consistency of the development environment. NOTE: I've not updated the readme in this PR.

Developer Validations

  • I ran yarn lint from the root of the repo & committed changes - (N/A)
  • Relevant documentation has been updated - give me a shout if you want me to strike / remove the appropriate section in .devcontainer/readme.md
  • I have tested my code functionality
  • Docker build succeeds locally

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/Mintplex-Labs/anything-llm/pull/2035 **Author:** [@MrSimonC](https://github.com/MrSimonC) **Created:** 8/2/2024 **Status:** ✅ Merged **Merged:** 8/5/2024 **Merged by:** [@timothycarambat](https://github.com/timothycarambat) **Base:** `master` ← **Head:** `2034-automate-port-forwarding-for-github-codespaces-using-gh-cli` --- ### 📝 Commits (9) - [`f3ed3bf`](https://github.com/Mintplex-Labs/anything-llm/commit/f3ed3bf053bdf24f395a9185fb95fa156ab8b3e8) open the server port to public on container post create - [`5ffe750`](https://github.com/Mintplex-Labs/anything-llm/commit/5ffe75026646ba013aea23a31fd0cc336c62dcb8) install gh on container start - [`3d9cdf6`](https://github.com/Mintplex-Labs/anything-llm/commit/3d9cdf679560489035dbc3a1ca887763b449a12e) remove port command until needed - [`e363da9`](https://github.com/Mintplex-Labs/anything-llm/commit/e363da92ae071fc0b530bc61f825a3b258b2e233) look for port 3001 to be available and make public - [`7f46589`](https://github.com/Mintplex-Labs/anything-llm/commit/7f4658940c1230ef75a2862fd7a6f0b0fc47a777) install netcat - [`254d6e9`](https://github.com/Mintplex-Labs/anything-llm/commit/254d6e9b72102c6224a971b91ffd5c7036b1c898) run background nc task before server start - [`5536e92`](https://github.com/Mintplex-Labs/anything-llm/commit/5536e92e2088bd9a9c713625e4ccaabbfa0b55aa) add sleep 5 due to error clashing with server start - [`a030291`](https://github.com/Mintplex-Labs/anything-llm/commit/a030291f4494db4dfbf1779772c3c52d5e75bfee) remove netcat, use gh cli - [`b68528c`](https://github.com/Mintplex-Labs/anything-llm/commit/b68528cbf619f12366393b175457520a61a9e8df) Merge branch 'Mintplex-Labs:master' into 2034-automate-port-forwarding-for-github-codespaces-using-gh-cli ### 📊 Changes **2 files changed** (+4 additions, -4 deletions) <details> <summary>View changed files</summary> 📝 `.devcontainer/devcontainer.json` (+3 -3) 📝 `.vscode/tasks.json` (+1 -1) </details> ### 📄 Description ### Pull Request Type - [x] ✨ feat - [ ] 🐛 fix - [ ] ♻️ refactor - [ ] 💄 style - [ ] 🔨 chore - [ ] 📝 docs ### Relevant Issues resolves #2034 ### What is in this change? This pull request introduces an automation for port forwarding in GitHub Codespaces using the gh CLI tool. Specifically, it updates the `devcontainer.json` to install the gh CLI tool and modifies the `tasks.json` file to poll the port until it’s redirected and apply the public property using the gh CLI. This change simplifies the development experience for GitHub Codespaces users by automating the port forwarding process. ### Additional Information This change is a follow-up to the existing documentation in the .devcontainer/README.md file, which mentions the need to manually set the port visibility to “Public” when running the server for the first time in GitHub Codespaces. This automation eliminates the need for manual configuration and improves the reliability and consistency of the development environment. NOTE: I've not updated the readme in this PR. ### Developer Validations - [ ] I ran `yarn lint` from the root of the repo & committed changes - _(N/A)_ - [ ] Relevant documentation has been updated - _give me a shout if you want me to strike / remove the appropriate section in `.devcontainer/readme.md`_ - [x] I have tested my code functionality - [ ] Docker build succeeds locally --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
yindo added the pull-request label 2026-02-22 18:34:39 -05:00
yindo closed this issue 2026-02-22 18:34:39 -05:00
yindo changed title from [PR #2035] 2034 automate port forwarding for GitHub codespaces using gh cli to [PR #2035] [MERGED] 2034 automate port forwarding for GitHub codespaces using gh cli 2026-06-05 15:15:37 -04:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: Mintplex-Labs/anything-llm#3861