schemaVersion: 2.1.0 metadata: name: spring-petclinic components: - name: tools container: image: quay.io/devfile/universal-developer-image:ubi8-0e189d9 memoryLimit: 3Gi endpoints: - exposure: none name: debug protocol: tcp targetPort: 5005 - exposure: public name: 8080-tcp protocol: http targetPort: 8080 volumeMounts: - name: m2 path: /home/user/.m2 - name: m2 volume: size: 1G - name: mariadb container: image: quay.io/eclipse/che--mariadb:10.7.1-5a8009369ee57c85b6f4a08406147bd9c505cde6b8250d16a27d2a5febfdead7 memoryLimit: 300Mi endpoints: - exposure: none name: db protocol: tcp targetPort: 3306 env: - name: MARIADB_USER value: petclinic - name: MARIADB_PASSWORD value: petclinic - name: MARIADB_DATABASE value: petclinic - name: MARIADB_ALLOW_EMPTY_ROOT_PASSWORD value: allow - name: PS1 value: $(echo ${0}) $ volumeMounts: - name: mysqldata path: /var/lib/mysql - name: mysqldata volume: size: 256Mi commands: - id: prepare-database exec: component: mariadb workingDir: ${PROJECT_SOURCE} commandLine: | mysql -u root < ${PROJECT_SOURCE}/src/main/resources/db/mysql/user.sql && \ mysql -u root petclinic < ${PROJECT_SOURCE}/src/main/resources/db/mysql/schema.sql && \ mysql -u root petclinic < ${PROJECT_SOURCE}/src/main/resources/db/mysql/data.sql && \ echo "\e[32mDone.\e[0m Database petclinic was configured" group: kind: run isDefault: true - id: maven-build exec: component: tools workingDir: ${PROJECT_SOURCE} commandLine: mvn clean install group: kind: build isDefault: true - id: run-with-hsqldb exec: component: tools workingDir: ${PROJECT_SOURCE} commandLine: | mvn spring-boot:run -DskipTests \ -Dspring-boot.run.jvmArguments='-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=5005,quiet=y' group: kind: run isDefault: true - id: run-with-mysql exec: component: tools workingDir: ${PROJECT_SOURCE} commandLine: | mvn spring-boot:run -DskipTests -Dspring-boot.run.profiles=mysql \ -Dspring-boot.run.jvmArguments='-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=5005,quiet=y' group: kind: run isDefault: true