-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdevfile.yaml
More file actions
107 lines (107 loc) · 2.63 KB
/
devfile.yaml
File metadata and controls
107 lines (107 loc) · 2.63 KB
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
107
schemaVersion: 2.2.2
metadata:
name: workshop-nodejs-extending_containers_in_your_workspace
version: 1.0.0
description: DevSpaces workspace for Node.js hello world translations app
attributes:
che-editor: vscode
components:
- name: node22-tools
container:
image: docker.io/library/node:22
command:
- sh
args:
- -c
- mkdir -p /tmp/.npm && while sleep 3600; do :; done
env:
- name: NPM_CONFIG_CACHE
value: /tmp/.npm
endpoints:
- exposure: public
name: node22-app
protocol: https
targetPort: 8080
path: /
cpuLimit: '2'
cpuRequest: '500m'
memoryLimit: '4Gi'
memoryRequest: '2Gi'
mountSources: true
- name: node24-tools
container:
image: docker.io/library/node:24
command:
- sh
args:
- -c
- mkdir -p /tmp/.npm && while sleep 3600; do :; done
env:
- name: NPM_CONFIG_CACHE
value: /tmp/.npm
endpoints:
- exposure: public
name: node24-app
protocol: https
targetPort: 8081
path: /
cpuLimit: '2'
cpuRequest: '500m'
memoryLimit: '4Gi'
memoryRequest: '2Gi'
mountSources: true
commands:
- id: node22-install
exec:
label: "1. Install dependencies (Node 22)"
component: node22-tools
workingDir: ${PROJECT_SOURCE}
commandLine: "npm install"
group:
kind: build
isDefault: true
- id: node22-test
exec:
label: "2. Run tests (Node 22)"
component: node22-tools
workingDir: ${PROJECT_SOURCE}
commandLine: "npm test"
group:
kind: test
isDefault: true
- id: node22-start
exec:
label: "3. Start development server (Node 22)"
component: node22-tools
workingDir: ${PROJECT_SOURCE}
commandLine: "npm start"
group:
kind: run
isDefault: true
- id: node24-install
exec:
label: "1b. Install dependencies (Node 24)"
component: node24-tools
workingDir: ${PROJECT_SOURCE}
commandLine: "npm install"
group:
kind: build
isDefault: false
- id: node24-test
exec:
label: "2b. Run tests (Node 24)"
component: node24-tools
workingDir: ${PROJECT_SOURCE}
commandLine: "npm test"
group:
kind: test
isDefault: false
- id: node24-start
exec:
label: "3b. Start development server (Node 24)"
component: node24-tools
workingDir: ${PROJECT_SOURCE}
commandLine: "npm start"
group:
kind: run
isDefault: false