Open cleverer opened 1 year ago
This PR has been reworked and optimized. Thanks to @BacLuc, @petter1 and all the others for their inputs and help!
New since the last time:
Currently not working:
docs/Devcontainer.md
and grab a coffee ;)TODOs for Puzzle
https://github.com/codespaces/new?ref=devcontainer&repo=277813823&machine=basicLinux32gb&geo=EuropeWest&devcontainer_path=.devcontainer%2Fgeneric%2Fdevcontainer.json
devcontainer_path
param accordingly..devcontainer
configs.If you have questions about how it "just works", check the docs/Devcontainer.md
and docs/DevcontainerInDepth.md
;)
@carlobeltrame I think I'm through with reworking, feel free to review and request more docs! Also: Feel free to squash when merging, there's a lot of trial and error here… ^^
Update for all interested in this: I talked to Puzzle/hitobito, they unfortunately don't have capacity to look at this at the moment. I'll investigate if we can fork this under https://github.com/scout-ch
Thank you @cleverer! I'm a new joiner and your pr was a massive help for setting up a devcontainer with working LSP across wagons!
I've combined it with the v2 branch: https://github.com/hitobito/development/tree/v2-devcontainer
I've migrated my branch to postgresql. I didn't need to change much. The work of @cleverer is still going strong.
@cleverer I think this is a good idea, however it would be good to dynamically generate the devcontainer.json files, or somehow change it that it only needs one. You could parse which wagons are available in the github repos.
Then also I would support your idea of putting a badge in the wagon repos to allow opening wagons inside a devcontainer. Thinking about this, most likely it would be easiest for this feature to put this into the wagon repositories directly, but considering that then we need to manage it there, maybe there is also a way to link from a devcontainer config inside the wagon to the full configuration in here.
@cleverer I think this is a good idea, however it would be good to dynamically generate the devcontainer.json files, or somehow change it that it only needs one. You could parse which wagons are available in the github repos.
Then also I would support your idea of putting a badge in the wagon repos to allow opening wagons inside a devcontainer. Thinking about this, most likely it would be easiest for this feature to put this into the wagon repositories directly, but considering that then we need to manage it there, maybe there is also a way to link from a devcontainer config inside the wagon to the full configuration in here.
Thank you for your for your inputs!
Upstream changed quite a lot of the setup, with new scripts etc. Also this PR actually already contains way too many changes. I would probably support splitting up all the changes into multiple smaller PRs, where we first only make sure to actually get the codespaces into the main branch and then can optimized with automated generation of the devcontainter configs.
I am not actively working with hitobito in my spare time and usually only did so at hackathons. So until the next Hackathon I will not touch this again. At the next Hackathon I might start over from scratch, porting all the changes in this PR onto develop and adapting it to the new setup. But I might also do something completely different… so if anyone wants to take up this topic, feel free to do so and refer to this PR.
Just works ;) (If you don't know how, check the docs)
After merging it would make sense to set up prebuilds: https://docs.github.com/en/codespaces/prebuilding-your-codespaces/configuring-prebuilds
I'd recommend to run weekly rebuilds I guess.
Prebuilds run on Github Actions which is free for public repositories, so no additional costs. Only storage for the prebuilt images is not enough with 15GB…