This repository has been archived by the owner on Aug 16, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 114
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Sergii Leshchenko <sleshche@redhat.com>
- Loading branch information
1 parent
98024df
commit 5408fff
Showing
3 changed files
with
112 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
--- | ||
displayName: Java Web Spring | ||
description: Default Java Spring Stack | ||
tags: ["Java", "Maven", "Spring Boot v2", ] | ||
tags: ["Java", "Maven", "Spring Boot v2"] | ||
icon: https://www.eclipse.org/che/images/logo-eclipseche.svg | ||
globalMemoryLimit: 2674Mi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,105 @@ | ||
--- | ||
apiVersion: 1.0.0 | ||
metadata: | ||
name: java-web-vertx | ||
projects: | ||
- | ||
name: java-web-vertx | ||
source: | ||
type: git | ||
location: "/~https://github.com/che-samples/web-java-vertx" | ||
components: | ||
- | ||
type: chePlugin | ||
id: redhat/java/latest | ||
- | ||
type: dockerimage | ||
alias: maven | ||
image: maven:3.6.0-jdk-11 | ||
command: ['sleep'] | ||
args: ['infinity'] | ||
env: | ||
- name: MAVEN_CONFIG | ||
value: /home/user/.m2 | ||
- name: MAVEN_OPTS | ||
value: "-XX:MaxRAMPercentage=50.0 -XX:+UseParallelGC -XX:MinHeapFreeRatio=10 | ||
-XX:MaxHeapFreeRatio=20 -XX:GCTimeRatio=4 -XX:AdaptiveSizePolicyWeight=90 | ||
-Dsun.zip.disableMemoryMapping=true -Xms20m -Djava.security.egd=file:/dev/./urandom | ||
-Duser.home=/home/user" | ||
- name: JAVA_OPTS | ||
value: "-XX:MaxRAMPercentage=50.0 -XX:+UseParallelGC -XX:MinHeapFreeRatio=10 | ||
-XX:MaxHeapFreeRatio=20 -XX:GCTimeRatio=4 -XX:AdaptiveSizePolicyWeight=90 | ||
-Dsun.zip.disableMemoryMapping=true -Xms20m -Djava.security.egd=file:/dev/./urandom" | ||
- name: JAVA_TOOL_OPTIONS | ||
value: "-XX:MaxRAMPercentage=50.0 -XX:+UseParallelGC -XX:MinHeapFreeRatio=10 | ||
-XX:MaxHeapFreeRatio=20 -XX:GCTimeRatio=4 -XX:AdaptiveSizePolicyWeight=90 | ||
-Dsun.zip.disableMemoryMapping=true -Xms20m -Djava.security.egd=file:/dev/./urandom" | ||
- name: PS1 | ||
value: $(echo ${0})\\$ | ||
- name: HOME | ||
value: /home/user | ||
memoryLimit: 512Mi | ||
endpoints: | ||
- name: '8080/tcp' | ||
port: 8080 | ||
mountSources: true | ||
volumes: | ||
- name: m2 | ||
containerPath: /home/user/.m2 | ||
- | ||
type: dockerimage | ||
alias: vertx | ||
image: vertx/vertx3:latest | ||
command: ['sleep'] | ||
args: ['infinity'] | ||
env: | ||
- name: POSTGRESQL_USER | ||
value: user | ||
- name: POSTGRESQL_PASSWORD | ||
value: password | ||
- name: POSTGRESQL_DATABASE | ||
value: my_data | ||
- name: POSTGRESQL_ADMIN_PASSWORD | ||
value: adminpassword | ||
- name: PS1 | ||
value: $(echo ${0})\\$ | ||
- name: HOME | ||
value: /home/user | ||
memoryLimit: 512Mi | ||
mountSources: true | ||
commands: | ||
- | ||
name: maven build | ||
actions: | ||
- | ||
type: exec | ||
command: "cd ${CHE_PROJECTS_ROOT}/web-java-spring && mvn -Duser.home=${HOME} clean install" | ||
component: maven | ||
- | ||
name: deploy | ||
actions: | ||
- | ||
type: exec | ||
command: "cd ${CHE_PROJECTS_ROOT}/web-java-spring && cp target/*.war ${TOMCAT_HOME}/webapps/ROOT.war" | ||
component: maven | ||
- | ||
name: start tomcat | ||
actions: | ||
- | ||
type: exec | ||
command: "${TOMCAT_HOME}/bin/catalina.sh run 2>&1" | ||
component: maven | ||
- | ||
name: stop tomcat | ||
actions: | ||
- | ||
type: exec | ||
command: "${TOMCAT_HOME}/bin/catalina.sh stop" | ||
component: maven | ||
- | ||
name: maven build and deploy | ||
actions: | ||
- | ||
type: exec | ||
command: "cd ${CHE_PROJECTS_ROOT}/web-java-spring && mvn -Duser.home=${HOME} clean install && cp target/*.war ${TOMCAT_HOME}/webapps/ROOT.war" | ||
component: maven |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
--- | ||
displayName: Java PostgreSQL | ||
description: Default Java PostgreSQL | ||
tags: ["Java", "Maven", "Spring Boot v2", "PostgreSQL"] | ||
icon: https://www.eclipse.org/che/images/logo-eclipseche.svg | ||
globalMemoryLimit: 2674Mi |