Skip to content

Introduce DevContainers #3429

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

brawaru
Copy link
Contributor

@brawaru brawaru commented Mar 27, 2025

Development containers allow to develop projects in a virtualised environment, e.g. with Docker on desktop, or remotely with providers like GitHub Codespaces.

This makes it extremely easy for people to contribute to the project, since the environment is already set up for them.

The following development containers are introduced with this commit:

  • app - for remote app development in the cloud.

    It includes a lightweight desktop environment and a VNC client to connect to the desktop remotely and interact with the running app.

  • app-local - for local app development on Linux desktops.

    Unlike app, it does not include desktop environment and relies on desktop forwarding provided by Visual Studio Code. This is only suitable for Linux hosts.

  • backend - for backend development.

    Features pre-configured database and other components required by Labrinth.

  • frontend - for frontend development.

    Everything you need to work with Modrinth frontend - Vue, Nuxt and other niceties included.

Some Visual Studio Code settings were also revised to remove unmaintained or broken extension recommendations, recommend different useful extensions, as well as declutter the explorer.

Development containers allow to develop projects in a virtualised
environment, e.g. with Docker on desktop, or remotely with providers
like GitHub Codespaces.

This makes it extremely easy for people to contribute to the project,
since the environment is already set up for them.

The following development containers are introduced with this commit:

- `app` - for remote app development in the cloud.

  It includes a lightweight desktop environment and a VNC client to
  connect to the desktop remotely and interact with the running app.

- `app-local` - for local app development on Linux desktops.

  Unlike `app`, it does not include desktop environment and relies on
  desktop forwarding provided by Visual Studio Code. This is only
  suitable for Linux hosts.

- `backend` - for backend development.

  Features pre-configured database and other components required by
  Labrinth.

- `frontend` - for frontend development.

  Everything you need to work with Modrinth frontend - Vue, Nuxt and
  other niceties included.

Some Visual Studio Code settings were also revised to remove
unmaintained or broken extension recommendations, recommend different
useful extensions, as well as declutter the explorer.
@brawaru brawaru force-pushed the chore/devcontainers/intro branch from 6f827bc to 9288391 Compare March 30, 2025 10:29
@IMB11 IMB11 mentioned this pull request Apr 3, 2025
4 tasks
@IMB11
Copy link
Contributor

IMB11 commented Apr 12, 2025

I've been using this for some upcoming PRs i plan to make, it's been incredibly useful and works great with Jetbrains Gateway for Webstorm/Rustrover and works seamlessly with github codespaces. Would be great to see this merged.

@AlexTMjugador
Copy link
Member

I think this PR is an interesting way of making developer onboarding much easier through development containers, good work! Is there any reason why it is in draft status?

@brawaru
Copy link
Contributor Author

brawaru commented May 4, 2025

Heya! As per my messages in Discord, the reason why this PR was marked as a Draft, is because it was meant to be slightly more. More specifically, it was meant to have another container for full stack development which combined both backend and frontend, linking them to work together, which would be nice when you are working on changes for both.

Unfortunately, it has proven difficult to further work on this thing, because it requires Docker, and Docker really requires Linux, whereas the latter is not very usable for me in my very specific situation (lack of GPU well supported by Linux). I am primarily using Windows again now, and there is Docker for Windows, but from my testing it's a lot lot worse and just incredibly cumbersome to work with, so I did not use it to work on this PR, besides just trying to get it running, which took an unreasonable amount of time and resources.

I will undraft the current version of PR, as it has been well tested, however, I will not be able to make any fixes that require testing, nor further improve it (this includes giving any maintenance in the future). So if anything needs be fixed, this PR has to be superseded. This is very disappointing and I'm sorry, I wish I could've anticipated this before initiating work on this, because now it feels I push something I am not even sure about :C

@brawaru brawaru marked this pull request as ready for review May 4, 2025 20:11
@AlexTMjugador
Copy link
Member

AlexTMjugador commented May 5, 2025

Your rationale is very understandable!

In any case, your contribution serves as a helpful reference for setting up a development environment, so thank you for taking the time to put it together. It would be great to complete and merge it at some point in the future, though it's not a high-priority task for us at the moment, so there's no set timeline for that to happen. Let's keep it open, now that expectations about it are clear.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

4 participants