Created
October 7, 2019 11:26
-
-
Save AndrienkoAleksandr/f6c9b0de7ecdafa09b11b490683da5fb to your computer and use it in GitHub Desktop.
Fedora with remote binary
This file contains hidden or 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: remote-binary-with-fedora | |
projects: | |
- name: nodejs-web-app | |
source: | |
location: 'https://github.com/che-samples/web-nodejs-sample.git' | |
type: git | |
branch: master | |
components: | |
- memoryLimit: 512Mi | |
type: chePlugin | |
reference: >- | |
https://raw.githubusercontent.com/AndrienkoAleksandr/che-plugin-registry/master/v3/plugins/che-incubator/typescript/fedora-with-copied-remote-binary/meta.yaml | |
- mountSources: true | |
endpoints: | |
- name: nodejs | |
port: 3000 | |
memoryLimit: 512Mi | |
type: dockerimage | |
alias: nodejs | |
image: 'quay.io/eclipse/che-nodejs10-ubi:nightly' | |
- memoryLimit: 256Mi | |
type: cheEditor | |
reference: >- | |
https://raw.githubusercontent.com/AndrienkoAleksandr/che-plugin-registry/master/v3/plugins/eclipse/che-theia/remote2/meta.yaml | |
apiVersion: 1.0.0 | |
commands: | |
- name: Attach remote debugger | |
actions: | |
- referenceContent: | | |
{ | |
"version": "0.2.0", | |
"configurations": [ | |
{ | |
"type": "node", | |
"request": "attach", | |
"name": "Attach to Remote", | |
"address": "localhost", | |
"port": 9229, | |
"localRoot": "${workspaceFolder}", | |
"remoteRoot": "#{workspaceFolder}" | |
} | |
] | |
} | |
type: vscode-launch | |
- name: download dependencies | |
actions: | |
- workdir: '${CHE_PROJECTS_ROOT}/nodejs-web-app/app' | |
type: exec | |
command: npm install | |
component: nodejs | |
- name: run the web app | |
actions: | |
- workdir: '${CHE_PROJECTS_ROOT}/nodejs-web-app/app' | |
type: exec | |
command: nodemon app.js | |
component: nodejs | |
- name: run the web app (debugging enabled) | |
actions: | |
- workdir: '${CHE_PROJECTS_ROOT}/nodejs-web-app/app' | |
type: exec | |
command: nodemon --inspect app.js | |
component: nodejs | |
- name: stop the web app | |
actions: | |
- type: exec | |
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.' | |
component: nodejs |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment