-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdevfile.yaml
93 lines (90 loc) · 2.27 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
schemaVersion: 2.1.0
metadata:
name: food-api-example
components:
- name: tools
container:
image: quay.io/devfile/universal-developer-image:ubi8-d433ed6
env:
- name: QUARKUS_HTTP_HOST
value: 0.0.0.0
endpoints:
- exposure: none
name: debug
protocol: tcp
targetPort: 5005
- exposure: public
name: list-all-food
protocol: http
targetPort: 8080
path: /food
volumeMounts:
- name: m2
path: /home/user/.m2
memoryLimit: 4G
mountSources: true
- name: ubi-minimal
container:
image: registry.access.redhat.com/ubi8/ubi-minimal
command: ['tail']
args: ['-f', '/dev/null']
memoryLimit: 64M
mountSources: true
- name: postgresql
container:
image: postgres:13.3
env:
- name: POSTGRES_USER
value: user
- name: POSTGRES_PASSWORD
value: password
- name: POSTGRES_DB
value: food_db
- name: PGDATA
value: /tmp/pgdata
- name: m2
volume:
size: 1G
commands:
- id: package
exec:
label: "Package"
component: tools
workingDir: ${PROJECTS_ROOT}/food-api-example
commandLine: "./mvnw package"
group:
kind: build
isDefault: true
- id: runtests
exec:
label: "Run tests"
component: tools
workingDir: ${PROJECTS_ROOT}/food-api-example
commandLine: "./mvnw test"
group:
kind: test
- id: packagenative
exec:
label: "Package Native"
component: tools
workingDir: ${PROJECTS_ROOT}/food-api-example
commandLine: "./mvnw package -Dnative -Dmaven.test.skip -Dquarkus.native.native-image-xmx=2G"
group:
kind: build
- id: startdev
exec:
label: "Start Development mode (Hot reload + debug)"
component: tools
workingDir: ${PROJECTS_ROOT}/food-api-example
commandLine: "./mvnw compile quarkus:dev"
group:
kind: run
isDefault: true
- id: startnative
exec:
label: "Start Native"
component: ubi-minimal
workingDir: ${PROJECTS_ROOT}/food-api-example/target
commandLine: "./food-api-example-1.0.0-SNAPSHOT-runner"
group:
kind: run