hitobito / development

Setup your local machine for hitobito development
GNU Affero General Public License v3.0
19 stars 15 forks source link

Add devcontainer and Github Codespaces setup #43

Open cleverer opened 1 year ago

cleverer commented 1 year ago

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…

cleverer commented 8 months 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:

TODOs for Puzzle

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… ^^

cleverer commented 6 months ago

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

openscript commented 4 months ago

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

openscript commented 2 months ago

I've migrated my branch to postgresql. I didn't need to change much. The work of @cleverer is still going strong.

Largo commented 2 weeks ago

@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 commented 2 weeks ago

@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.