forked from NUMde/compass-numapp-backend
-
Notifications
You must be signed in to change notification settings - Fork 0
/
devfile.yaml
76 lines (76 loc) · 2.12 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
---
apiVersion: 1.0.0
metadata:
generateName: numapp-backend-
projects:
- name: compass-backend
source:
location: 'git@eu-de.git.cloud.ibm.com:num/compass/compass-backend.git'
type: git
branch: main
clonePath: COMPASS/compass-backend
components:
- id: redhat/vscode-openshift-connector/latest
memoryLimit: 1280Mi
type: chePlugin
alias: openshift-connector
- id: che-incubator/typescript/latest
memoryLimit: 512Mi
type: chePlugin
- type: chePlugin
id: ms-vscode/node-debug2/latest
preferences:
debug.node.useV3: false
- type: dockerimage
alias: nodejs
image: quay.io/eclipse/che-nodejs10-ubi:nightly
memoryLimit: 512Mi
endpoints:
- name: 'nodejs'
port: 3000
mountSources: true
commands:
- name: download dependencies
actions:
- type: exec
component: nodejs
command: npm install
workdir: ${CHE_PROJECTS_ROOT}/nodejs-web-app/app
- name: run the web app
actions:
- type: exec
component: nodejs
command: nodemon app.js
workdir: ${CHE_PROJECTS_ROOT}/nodejs-web-app/app
- name: run the web app (debugging enabled)
actions:
- type: exec
component: nodejs
command: nodemon --inspect app.js
workdir: ${CHE_PROJECTS_ROOT}/nodejs-web-app/app
- name: stop the web app
actions:
- type: exec
component: nodejs
command: >-
node_server_pids=$(pgrep -fx '.*nodemon (--inspect )?app.js' | tr "\\n" " ") &&
echo "Stopping node server with PIDs: ${node_server_pids}" &&
kill -15 ${node_server_pids} &>/dev/null && echo 'Done.'
- name: Attach remote debugger
actions:
- type: vscode-launch
referenceContent: |
{
"version": "0.2.0",
"configurations": [
{
"type": "node",
"request": "attach",
"name": "Attach to Remote",
"address": "localhost",
"port": 9229,
"localRoot": "${workspaceFolder}",
"remoteRoot": "${workspaceFolder}"
}
]
}