这是indexloc提供的服务,不要输入任何密码
Skip to content

Conversation

@MrSimonC
Copy link
Contributor

@MrSimonC MrSimonC commented Aug 2, 2024

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

@timothycarambat
Copy link
Member

Ah, I see - very neat and convenient. Thank you

@timothycarambat timothycarambat merged commit b961299 into Mintplex-Labs:master Aug 5, 2024
@MrSimonC MrSimonC deleted the 2034-automate-port-forwarding-for-github-codespaces-using-gh-cli branch August 5, 2024 16:54
cabwds pushed a commit to cabwds/anything-llm that referenced this pull request Jul 3, 2025
…tplex-Labs#2035)

* open the server port to public on container post create

* install gh on container start

* remove port command until needed

* look for port 3001 to be available and make public

* install netcat

* run background nc task before server start

* add sleep 5 due to error clashing with server start

* remove netcat, use gh cli
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.

[FEAT]: Automate Port Forwarding for GitHub Codespaces using gh CLI

2 participants