Skip to content

Add dev containers#1514

Merged
ElliotFriend merged 22 commits intomainfrom
add-dev-containers
Jun 10, 2025
Merged

Add dev containers#1514
ElliotFriend merged 22 commits intomainfrom
add-dev-containers

Conversation

@anataliocs
Copy link
Copy Markdown
Contributor

@anataliocs anataliocs commented Apr 28, 2025

Run Docs in Devcontainer. #1512

Features:

  • Replace Gitpod link for Stellar docs README with Devcontainers Remove links to Gitpod, use Devcontainer file(s) instead #1343
  • Opens docs in VS Code
  • Node/Yarn/Deps pre-installed
  • Automatically opens Docusaurus local instance on Port 3000
  • Can run all npm/yarn tasks
  • Allows you to do full Github commit -> PR workflow from within Devcontainers
  • Lowers barrier to updating docs greatly

Testing steps:

Signed-off-by: Chris.Anatalio <chris.anatalio@stellar.org>
Signed-off-by: Chris.Anatalio <chris.anatalio@stellar.org>
@anataliocs anataliocs self-assigned this Apr 28, 2025
Signed-off-by: Chris.Anatalio <chris.anatalio@stellar.org>
Signed-off-by: Chris.Anatalio <chris.anatalio@stellar.org>
Signed-off-by: Chris.Anatalio <chris.anatalio@stellar.org>
Signed-off-by: Chris.Anatalio <chris.anatalio@stellar.org>
@ElliotFriend
Copy link
Copy Markdown
Contributor

sweet! thanks for the PR! is there a way i can test it out in a codespace using this branch (probably a dumb question lol)?

@anataliocs
Copy link
Copy Markdown
Contributor Author

anataliocs commented Apr 28, 2025

Replace [Branch name or commit hash] with your desired value!

https://codespaces.new/stellar/stellar-docs/tree/[Branch name or commit hash]

Signed-off-by: Chris.Anatalio <chris.anatalio@stellar.org>
Copy link
Copy Markdown
Contributor

@ElliotFriend ElliotFriend left a comment

Choose a reason for hiding this comment

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

this seems like a great start to the effort! left a couple questions/notes on the devcontainer file.

Comment thread .devcontainer/devcontainer.json Outdated
Comment thread .devcontainer/devcontainer.json Outdated
Signed-off-by: Chris.Anatalio <chris.anatalio@stellar.org>
Signed-off-by: Chris.Anatalio <chris.anatalio@stellar.org>
@stellar stellar deleted a comment from stellar-jenkins Apr 28, 2025
@stellar stellar deleted a comment from stellar-jenkins Apr 28, 2025
@stellar stellar deleted a comment from stellar-jenkins Apr 28, 2025
@stellar stellar deleted a comment from stellar-jenkins Apr 28, 2025
@stellar stellar deleted a comment from stellar-jenkins Apr 28, 2025
@stellar stellar deleted a comment from stellar-jenkins Apr 28, 2025
Signed-off-by: Chris.Anatalio <chris.anatalio@stellar.org>
@stellar stellar deleted a comment from stellar-jenkins Apr 28, 2025
@stellar stellar deleted a comment from stellar-jenkins Apr 28, 2025
Signed-off-by: Chris.Anatalio <chris.anatalio@stellar.org>
@stellar stellar deleted a comment from stellar-jenkins Apr 29, 2025
Signed-off-by: Chris.Anatalio <chris.anatalio@stellar.org>
@stellar stellar deleted a comment from stellar-jenkins Apr 29, 2025
@anataliocs
Copy link
Copy Markdown
Contributor Author

@briwylde08 @ElliotFriend Ok fiddled with the commands so it's much more clear what is happening. Devcontainers is VERY PARTICULAR about command ordering but I think it's pretty solid now.

I also added a devcontainers.md that auto-opens to kinda orient people to what's going on.

image

@anataliocs anataliocs added documentation Improvements or additions to documentation enhancement New feature or request dev-rel labels May 5, 2025
Copy link
Copy Markdown
Contributor

@ElliotFriend ElliotFriend left a comment

Choose a reason for hiding this comment

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

lookin' good! left a couple questions that might be dumb lol

thanks for the work!

Comment thread package.json Outdated
Comment on lines +8 to +12
"start-bg": "nohup yarn start --port 3000 > docs.log 2>&1 & echo $! > run.pid",
"dc-process": "echo Docusaurus running on process: $(cat run.pid)",
"dc-start": "yarn start-bg && yarn dc-process",
"dc-stop": "kill -9 $(lsof -t -i:3000)",
"dc-restart": "yarn dc-stop && yarn dc-start",
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

to be honest, i'm a bit hesitant to add more scripts here. it's probably already a little too crowded and could use some cleaning up lol.

is there a way we can put these into the devcontainer.json file, where they might be a little more "at home"?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Yea I can move them to shell scripts, package.json is crowded already

Comment thread .devcontainer/devcontainer.json Outdated
},
"extensions": [
"dbaeumer.vscode-eslint",
"orta.vscode-jest",
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

i don't think we use jest in this repo. do we need it in the devcontainer?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Oh yea nice call out thank you!

@stellar-jenkins
Copy link
Copy Markdown

@stellar stellar deleted a comment from stellar-jenkins May 23, 2025
@stellar stellar deleted a comment from stellar-jenkins May 23, 2025
@stellar stellar deleted a comment from stellar-jenkins May 23, 2025
@stellar stellar deleted a comment from stellar-jenkins May 23, 2025
Copy link
Copy Markdown
Contributor

@ElliotFriend ElliotFriend left a comment

Choose a reason for hiding this comment

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

looks good to me! thanks for all the work on this! I left one nitpick-y comment that you're free to ignore if you want.

Is this one ready, or do you have more work to do on it?

Comment thread README.md Outdated
Comment on lines +255 to +257



Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

nit: got some extra blank lines here at the end.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Best practice on github is to use the suggestion feature for minor 1 line changes

Comment thread README.md Outdated
Comment thread README.md Outdated
Comment thread README.md Outdated
Comment thread README.md Outdated
@stellar-jenkins
Copy link
Copy Markdown

@stellar stellar deleted a comment from stellar-jenkins Jun 10, 2025
@stellar stellar deleted a comment from stellar-jenkins Jun 10, 2025
Copy link
Copy Markdown
Contributor

@ElliotFriend ElliotFriend left a comment

Choose a reason for hiding this comment

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

lgtm!

@ElliotFriend ElliotFriend merged commit 9129535 into main Jun 10, 2025
4 checks passed
@ElliotFriend ElliotFriend deleted the add-dev-containers branch June 10, 2025 19:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dev-rel documentation Improvements or additions to documentation enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants