-
Notifications
You must be signed in to change notification settings - Fork 13
/
devfile.yaml
106 lines (90 loc) · 2.42 KB
/
devfile.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
schemaVersion: 2.2.2
metadata:
name: java-guestbook
components:
- name: tools
container:
image: quay.io/devfile/universal-developer-image:ubi8-latest
memoryLimit: 3Gi
endpoints:
- name: backend
exposure: public
protocol: https
targetPort: 8080
- name: frontend
exposure: public
protocol: https
targetPort: 8443
- name: debug
exposure: none
protocol: tcp
targetPort: 5005
volumeMounts:
- name: m2
path: /home/user/.m2
- name: mongo
container:
image: quay.io/eclipse/che--centos--mongodb-36-centos7:latest-ffdf2431bbc6d9a9d2a03e95bbbe8adb49ab9eac301f268a35038c84288259c1
memoryLimit: 300Mi
env:
- name: MONGODB_USER
value: user
- name: MONGODB_PASSWORD
value: password
- name: MONGODB_DATABASE
value: guestbook
- name: MONGODB_ADMIN_PASSWORD
value: password
endpoints:
- name: mongodb
exposure: none
protocol: tcp
targetPort: 27017
volumeMounts:
- name: mongodbdata
path: /var/lib/mongodb/data
- name: m2
volume:
size: 1G
- name: mongodbdata
volume:
size: 256Mi
commands:
- id: maven-build-backend
exec:
label: "build backend"
component: tools
workingDir: ${PROJECT_SOURCE}/backend
commandLine: "mvn clean install"
group:
kind: build
isDefault: true
- id: maven-build-frontend
exec:
label: "build frontend"
component: tools
workingDir: ${PROJECT_SOURCE}/frontend
commandLine: "mvn clean install"
group:
kind: build
isDefault: true
- id: run-backend
exec:
label: "run backend"
component: tools
workingDir: ${PROJECT_SOURCE}/backend
commandLine: |
mvn spring-boot:run -DskipTests -Drun.jvmArguments='-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=5006,quiet=y'
group:
kind: run
isDefault: true
- id: run-frontend
exec:
label: "run frontend"
component: tools
workingDir: ${PROJECT_SOURCE}/frontend
commandLine: |
mvn spring-boot:run -DskipTests -Drun.jvmArguments='-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=5005,quiet=y'
group:
kind: run
isDefault: true