ガイド一覧

Java · Spring Boot

Detects Maven or Gradle, builds the jar and runs it with -Dserver.port=$PORT.

  1. 1Health check

    Add spring-boot-starter-actuator and set the health check path to /actuator/health.

    xml
    <dependency>
      <groupId>org.springframework.boot</groupId>
      <artifactId>spring-boot-starter-actuator</artifactId>
    </dependency>
  2. 2Memory

    The JVM uses 75% of container memory (MaxRAMPercentage=75). 1 GiB or more is recommended.

  3. 3Deploy (pick one)

    ① Connect GitHub: Project → Add service → GitHub repository (deploys on push) ② From this folder: oc up --wait (builds even without a Dockerfile) ③ Upload a folder or zip in the console: Add service → Upload source

    bash
    oc login
    oc project create my-app --link
    oc up --wait

関連ガイド