Skip to content

Support for Spring boot (java based system) #357

Closed

Description

@hariohmprasath

Describe the feature

A clear and concise description of what the feature idea is. Please make sure you didn't find an existing issue with the same subject.

Spring boot is one of the heavily used containerized environment when it comes to java, it would be great to have this support added to this platform. The whole build and packing can be done in a build container so the developer can just concentrate on write code, instead of worrying about the build & deployment platform.

I will be happy to contribute this, let me know if the team is interested in bring this support to platform

Backward compatibility concerns

Would this be BC?
No

Use cases

Springboot (java based environment)

Examples

Microservices & applications built using Spring boot

Activity

  1. fbrissi commented on Jul 6, 2021

    @fbrissi
    Contributor

    A spring-boot preset would be great.
    It's something we already thought we started looking at this with a docker image for the kool.

    You can by taking a look at it, it's still a start.

    https://github.com/kool-dev/docker-java

    Start with Spring-boot in https://start.spring.io with Java 8, gradle or maven and Spring-boot 2.4.8 because the new Spring version needs Gradle 6.8.x, 6.9.x or 7.x, we need to update that in this image and teste with more use case, and with Spring Web.

    We still don't have a preset that creates the project but I think we can have it using our own API.

    Example:
    https://start.spring.io/starter.zip?type=gradle-project&language=java&bootVersion=2.4.8.RELEASE&baseDir=demo&groupId=com.example&artifactId=demo&name=demo&description=Demo%20project%20for%20Spring%20Boot&packageName=com.example.demo&packaging=jar&javaVersion=1.8&dependencies=web

    Create the files:

    docker-compose.yml

    version: '3'
    services:
      app:
        image: kooldev/java:8
        ports:
          - "${KOOL_HTTP_PORT:-80}:8080"
        environment:
          MAIN_CLASS: "com.example.demo.DemoApplication"
          ASUSER: "${KOOL_ASUSER:-0}"
          UID: "${UID:-0}"
        volumes:
          - .:/app:delegated
        networks:
          - kool_local
          - kool_global
    
    networks:
      kool_local:
      kool_global:
        external: true
        name: "${KOOL_GLOBAL_NETWORK:-kool_global}"

    kool.yml

    scripts:
      mvn: kool docker kooldev/java:8 mvn
      gradle: kool docker kooldev/java:8 gradle
      jshell: kool docker kooldev/java:11 jshell

    And execute:

    kool run gradle build # gradle
    kool run mvn package # maven
    kool start
  2. hariohmprasath commented on Jul 6, 2021

    @hariohmprasath
    Author

    Hi @fbrissi,
    This is awesome, thanks for the quick response and I will definitely try it out. The next one that would be super useful would be go, let me create a feature request and I see you dont have a repo for this yet. Will be happy to contribute let me know.

    • Hari
  3. fabriciojs commented on Jul 7, 2021

    @fabriciojs
    Member

    Hello @hariohmprasath ! Thanks for getting in touch!

    Yeah, would be great to have the preset for Java and Golang! We started with the stacks we work the most ourselves (PHP and Javascript) as we felt more confident building them. Now we want to expand/cover all major stacks that work well with dockerized environments.

    While we are looking to expand the presets would be great to have people with more expertise in stacks like Java, .NET, Python willing to help build/document/maintain presets for these stacks! Leveraging the Kool presets schema.

    Well having said that, as Filipe mentioned above we have some work in progress for Java - but still, there is some considerable work required to have a proper tested preset we can document and ship with kool.

    Please feel free to join us at Slack to discuss ideas/get help on how to contribute/build this preset!

  4. self-assigned this
    on Aug 18, 2021
  5. locked and limited conversation to collaborators on Dec 8, 2021
  6. converted this issue into a discussion #399 on Dec 8, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions