pf2e
pf2e copied to clipboard
Add support for Github codespaces and Vscode devcontainers
I have found that it is extremely helpful dev particularity new devs to have reproducible dev environments. Github code spaces and devcontainers are a great way of supporting this.
In my fork I have gone the new dev work flow down to.
- clone the repo
- open in vscode and edit the .env.example file to include your foundry username and password rename to .env
- hit the popup to reopen in a container
- wait for the container to build
- run
npm run build - open foundry on http://localhost:30001 and enter admin password
pf2edev
Sorry, maybe you could help me understand your request. Are you wanting Foundry run from a codespaces container?
I think in the almost entire year I've been devving, not one issue stemmed from differing dev environments (outside of failing builds because someone didn't npm ci), outside of users running an older version of something. Any dev environment conflicts didn't come from the runtime, but from using a web browser on mac vs a web browser on windows.
In general devcontainers allow for better dev environment management. In my case I develop on a low power computer by running the containers on a more powerful remote server. That is a pretty niche use case a more common one is GitHub Codespaces. Or developing on a Chromebook. Along with this flexibility it also allows for a lower beerier to entry for new contributors, especially one who are not comfortable setting up a dev environment.
If that website does not adequately explain it let me know and I can provide more resources.
Sorry, we're not going to be able to host a functioning dev container anywhere.
@stwlam I think you are misunderstanding the purpose of devcontainers. The project hosts nothing.
there are just a few changes to the repo required. you can take a look at my fork for the necessary changes.
Where would the container live? You've set one up on your own, and that didn't require any changes to the project.
The changes to the repo are config files that inform IDE's how to create containerized dev environments. In the most basic case you clone the repo and your IDE asks if you would like it to setup the necessary container locally on your computer.
In this case it starts a container with node installed. and then the official foundry docker container and configure them to share the outputs of the build.
That's fine to do, but the project isn't going to have committed configuration files for every IDE.
I agree that committing files for every IDE is an awful idea, that is not what I'm suggesting. Development Containers are an open standard and have tight integration with Github, this projects repository and continuous integration provider of choice.
The point of this is to lower the barrier for entry to new contributors. I think that it is hard for you to see all of the benefits as you have been working on this project regularly for a very long time. As such you are very comfortable with the current flow.
Ether way it is not a big deal for me. I can continue to use my fork with the necessary configuration changes.
Go ahead and make a PR, and we'll look it over.