schemaVersion: 2.2.2
metadata:
  name: quarkus-quickstart
components:
  - name: tools
    container:
      image: registry.redhat.io/devspaces/udi-rhel9:3.20
      env:
        - name: QUARKUS_HTTP_HOST
          value: 0.0.0.0
      endpoints:
        - exposure: none
          name: debug
          protocol: tcp
          targetPort: 5005
        - exposure: public
          name: hello-greeting
          protocol: https
          targetPort: 8080
          path: /hello/greeting/devspaces-user
      volumeMounts:
        - name: m2
          path: /home/user/.m2
      cpuLimit: '4'
      cpuRequest: '1'
      memoryLimit: '8G'
      memoryRequest: '4G'
      mountSources: true
  - name: m2
    volume:
      size: 1G
commands:
  - id: 1-package
    exec:
      label: "1. Package the application"
      component: tools
      workingDir: ${PROJECTS_ROOT}/quarkus-quickstarts/getting-started
      commandLine: "mvn package"
      group:
        kind: build
        isDefault: true
  - id: 2-startdev
    exec:
      label: "2. Start Development mode (Hot reload + debug)"
      component: tools
      workingDir: ${PROJECTS_ROOT}/quarkus-quickstarts/getting-started
      commandLine: "mvn compile quarkus:dev"
      group:
        kind: run
        isDefault: true
projects:
  - name: quarkus-quickstarts
    zip:
      location: CHE_DASHBOARD_INTERNAL_URL/dashboard/api/airgap-sample/project/download?id=quarkus-rest-api
