Created
November 8, 2019 14:14
-
-
Save slemeur/1d9a659fc9f5a63aede2e0a8c7b4d63c to your computer and use it in GitHub Desktop.
devfile wild west
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
metadata: | |
name: wild-west | |
projects: | |
- name: backend | |
source: | |
location: 'https://github.com/openshift-evangelists/Wild-West-Backend' | |
type: git | |
- name: frontend | |
source: | |
location: 'https://github.com/openshift-evangelists/Wild-West-Frontend' | |
type: git | |
components: | |
- id: che-incubator/typescript/latest | |
memoryLimit: 512Mi | |
type: chePlugin | |
- mountSources: true | |
endpoints: | |
- name: nodejs | |
port: 3000 | |
memoryLimit: 512Mi | |
type: dockerimage | |
alias: nodejs | |
image: 'quay.io/eclipse/che-nodejs10-ubi:7.3.1' | |
- mountSources: true | |
endpoints: | |
- name: 8080/tcp | |
port: 8080 | |
memoryLimit: 512Mi | |
type: dockerimage | |
volumes: | |
- name: m2 | |
containerPath: /home/user/.m2 | |
image: 'quay.io/eclipse/che-java11-maven:nightly' | |
alias: maven | |
env: | |
- value: /home/user/.m2 | |
name: MAVEN_CONFIG | |
- value: >- | |
-XX:MaxRAMPercentage=50 -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: MAVEN_OPTS | |
- value: >- | |
-XX:MaxRAMPercentage=50 -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_OPTS | |
- value: >- | |
-XX:MaxRAMPercentage=50 -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 | |
- id: https://raw.githubusercontent.com/eclipse/che-plugin-registry/master/v3/plugins/redhat/vscode-openshift-connector/0.1.1/meta.yaml | |
type: chePlugin | |
- id: redhat/java/latest | |
memoryLimit: 1512Mi | |
type: chePlugin | |
apiVersion: 1.0.0 | |
commands: | |
- name: frontend - download dependencies | |
actions: | |
- workdir: '${CHE_PROJECTS_ROOT}/frontend' | |
type: exec | |
command: npm install | |
component: nodejs | |
- name: frontend - run app | |
actions: | |
- workdir: '${CHE_PROJECTS_ROOT}/frontend' | |
type: exec | |
command: >- | |
export BACKEND_SERVICE=${HOSTNAME}:8080 && export PORT=3000 && node | |
server.js | |
component: nodejs | |
- name: backend - maven package | |
actions: | |
- workdir: '${CHE_PROJECTS_ROOT}/backend' | |
type: exec | |
command: mvn package | |
component: maven | |
- name: backend - run app | |
actions: | |
- workdir: '${CHE_PROJECTS_ROOT}/backend' | |
type: exec | |
command: java -jar target/*.jar | |
component: maven |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment