Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Devcontainer Tweaks for Running Locally #848

Merged
merged 3 commits into from
Dec 11, 2024

Conversation

ikegentz
Copy link
Contributor

Description

Was opening the docs for the first time the other day (had never worked in this repo before so have a "vanilla, clean" install). Was not able to access the docs in my browser when using the devcontainer. This is a two-fold issue:

  • No port is specified to be fowarded in the devcontainer configuration
  • Docusaurus needed to be configured to listen on other hosts besides localhost. In this case, 0.0.0.0 (any host) makes sense since the development server will only ever used locally, may as well listen on any address the devcontainer may be given

Related Issue(s)

No related issue, this is just something I noticed when working on something else and figured it may as well get fixed

Fixes #

How to test

Open the devcontainer on the main branch, you can't get to localhost:3000/docs. Now checkout this branch, and reopen the devcontainer, it will now be accessible

@ikegentz ikegentz force-pushed the ikegentz/devcontainer-port-forward branch 4 times, most recently from a74ae49 to e23482b Compare December 11, 2024 01:58
@ikegentz ikegentz force-pushed the ikegentz/devcontainer-port-forward branch from e23482b to 10b15e6 Compare December 11, 2024 02:00
@fharper fharper requested a review from mrsimonemms December 11, 2024 13:03
.devcontainer/devcontainer.json Outdated Show resolved Hide resolved
package.json Outdated Show resolved Hide resolved
.devcontainer/devcontainer.json Outdated Show resolved Hide resolved
@fharper
Copy link
Contributor

fharper commented Dec 11, 2024

@ikegentz thanks for this PR. @mrsimonemms is the only one using Devcontainer so I'll let him review this (he already did). Note that he is on vacation starting today, so the final approval may not be until January.

Copy link
Contributor

@mrsimonemms mrsimonemms left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a couple of things to address

@ikegentz ikegentz force-pushed the ikegentz/devcontainer-port-forward branch from 529a193 to 3aa88bb Compare December 11, 2024 19:59
@ikegentz
Copy link
Contributor Author

ikegentz commented Dec 11, 2024

Just a couple of things to address

Thanks for the quick review. You're correct, the EditorConfig extension needed configured to get the newlines saving and indentation set correctly.

I included the .editorconfig file that I needed to use to get this working, in the last commit. It seems like that should be included in the repo for consistency when using the devcontainer, but let me know what you think.

@ikegentz
Copy link
Contributor Author

@ikegentz thanks for this PR. @mrsimonemms is the only one using Devcontainer so I'll let him review this (he already did). Note that he is on vacation starting today, so the final approval may not be until January.

No worries thanks for the quick review. I think this is all set to go whenever

Copy link
Contributor

@fharper fharper left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mrsimonemms I'm approving since you are on vacation. Feel free to update anything once you're back.

Thanks @ikegentz 🎉

@fharper fharper merged commit 340a25a into konstructio:main Dec 11, 2024
2 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.

3 participants