jhipster / generator-jhipster

JHipster is a development platform to quickly generate, develop, & deploy modern web applications & microservice architectures.
https://www.jhipster.tech
Apache License 2.0
21.54k stars 4.02k forks source link

Add .devcontainers #17612

Closed SandraAhlgrimm closed 2 years ago

SandraAhlgrimm commented 2 years ago
Overview of the feature request

Adding devcontainers will enable jhipster users to use GitHub Codespaces or VS Code with well configured out of the box.

A devcontainer.json file in your project tells VS Code how to access (or create) a development container with a well-defined tool and runtime stack. This container can be used to run an application or to sandbox tools, libraries, or runtimes needed for working with a codebase. Find more in the official documentation here.

Motivation for or Use Case
  1. Enable every developer to have a smoother start with their generated jhipster project.
  2. Get the possibility to use more powerful machines within gh codespaces.
Related issues or PR

none

pascalgrimaud commented 2 years ago

It could be a good idea and it won't impact existing projects which don't use GitHub Codespaces, so it can be generated by default

@SandraAhlgrimm : can you post an example of this file?

atomfrede commented 2 years ago

This should create a .devcontainer.json for the generated project and not development of jhipster itself, right?

SandraAhlgrimm commented 2 years ago

Yes. For the generated project. I am currently working on having one for the default options to discuss.

SandraAhlgrimm commented 2 years ago

I am experimenting with a jhipster generated project with all settings left as default here:

https://github.com/SandraAhlgrimm/jhipster-sample-devcontainer/tree/main/.devcontainer

@pascalgrimaud

pascalgrimaud commented 2 years ago

Thanks @SandraAhlgrimm It looks pretty simple and could be generated by default in generated JHipster projects

SandraAhlgrimm commented 2 years ago

Great. I'll go ahead and propose a PR

SandraAhlgrimm commented 2 years ago

Opened draft pull request here #17792 Looking forward to your review and comments!

@pascalgrimaud @atomfrede

vishal423 commented 2 years ago

Since the change is quite independent, can this be included in a separate subgen or as a module or behind a flag?

pascalgrimaud commented 2 years ago

@vishal423 : it was originaly suggested by @jdubois as I know he uses codespaces. Then, as it's in a .folder I don't think it impacts our user, we can have it by default, it's not a problem

SandraAhlgrimm commented 2 years ago

Having it hidden in a subgen or flag would exclude a lot of users, especially beginners, who would benefit the most from this feature to setup your dev environment right away. Of course, it can be enhanced with more smartness so that database extensions, etc. are also included if they're chosen within the generator.

DanielFran commented 2 years ago

Closed by https://github.com/jhipster/generator-jhipster/pull/17792

spotlesscoder commented 1 year ago

I would also live a .devcontainer for the JHipster generator repository itself to automatically install supported java and npm version when I want to contribute to JHipster