Skip to content

Instantly share code, notes, and snippets.

@rhopp
Last active April 9, 2020 12:56
Show Gist options
  • Save rhopp/0aaebe48a1b58683c66fef783f8a32e3 to your computer and use it in GitHub Desktop.
Save rhopp/0aaebe48a1b58683c66fef783f8a32e3 to your computer and use it in GitHub Desktop.
---
apiVersion: 1.0.0
metadata:
generateName: covidVolutneering-
projects:
-
name: node-app
source:
type: git
location: "[email protected]:rhopp/node-app.git"
-
name: web-app
source:
type: git
location: "[email protected]:rhopp/web-app.git"
components:
- id: che-incubator/typescript/latest
memoryLimit: 1024Mi
type: chePlugin
- id: eclipse/che-theia/latest
memoryLimit: 2048Mi
type: cheEditor
- mountSources: true
endpoints:
- name: web-app
port: 5000
- name: node-app
port: 8001
memoryLimit: 1536Mi
type: dockerimage
image: 'quay.io/eclipse/che-nodejs8-centos:nightly'
alias: nodejs
- endpoints:
- name: mock-ad-service
port: 8080
attributes:
discoverable: 'true'
public: 'false'
memoryLimit: 128Mi
type: dockerimage
image: 'quay.io/rhopp/mock-ad-service:latest'
alias: mock-ad-service
- endpoints:
- name: mongodb-34-centos7
port: 27017
attributes:
discoverable: 'true'
public: 'false'
memoryLimit: 512Mi
type: dockerimage
volumes:
- name: mongo-storage
containerPath: /var/lib/mongodb/data
image: docker.io/centos/mongodb-34-centos7
alias: mongo
env:
- value: user
name: MONGODB_USER
- value: password
name: MONGODB_PASSWORD
- value: covidVolunteers
name: MONGODB_DATABASE
- value: password
name: MONGODB_ADMIN_PASSWORD
commands:
-
name: install all required dependencies
actions:
- type: exec
component: nodejs
command: cd ${CHE_PROJECTS_ROOT}/node-app && npm install && cd ${CHE_PROJECTS_ROOT}/web-app && npm install && npm install serve
workdir: ${CHE_PROJECTS_ROOT}
-
name: start node-app
actions:
- type: exec
component: nodejs
command: npm start
workdir: ${CHE_PROJECTS_ROOT}/node-app
-
name: start web-app
actions:
- type: exec
component: nodejs
command: npm run build && ./node_modules/serve/bin/serve.js -s build
workdir: ${CHE_PROJECTS_ROOT}/web-app
-
name: Debug remote node application
actions:
- type: vscode-launch
referenceContent: |
{
"version": "0.2.0",
"configurations": [
{
"type": "node",
"name": "Debug (Attach) - Remote",
"request": "attach",
"port": 9229
}]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment