Skip to content

Commit

Permalink
Add Java Web Vert.x devfile
Browse files Browse the repository at this point in the history
Signed-off-by: Sergii Leshchenko <sleshche@redhat.com>
  • Loading branch information
sleshchenko committed Jun 20, 2019
1 parent 31ea8b6 commit 4e33d46
Show file tree
Hide file tree
Showing 2 changed files with 69 additions and 0 deletions.
63 changes: 63 additions & 0 deletions devfiles/java-web-vertx/devfile.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
---
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: registry.centos.org/che-stacks/centos-jdk8
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
commands:
-
name: maven build
actions:
-
type: exec
command: "cd ${CHE_PROJECTS_ROOT}/java-web-vertx && mvn -Duser.home=${HOME} clean install"
component: maven
-
name: run app
actions:
-
type: exec
command: "cd ${CHE_PROJECTS_ROOT}/java-web-vertx && java -jar ./target/*fat.jar"
component: maven
6 changes: 6 additions & 0 deletions devfiles/java-web-vertx/meta.yaml
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

0 comments on commit 4e33d46

Please sign in to comment.