-
Notifications
You must be signed in to change notification settings - Fork 31
/
devfile.yaml
58 lines (55 loc) · 1.51 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
schemaVersion: 2.2.2
metadata:
name: nodejs-mongodb
components:
- name: tools
container:
image: quay.io/devfile/universal-developer-image:ubi8-latest
env:
# The values below are used to set up the environment for running the application
- name: SECRET
value: 220fd770-c028-480d-8f95-f84353c7d55a
- name: NODE_ENV
value: production
endpoints:
- exposure: public
name: nodejs
targetPort: 8080
protocol: https
memoryLimit: 1G
mountSources: true
- name: mongo
container:
image: quay.io/eclipse/che--centos--mongodb-36-centos7:latest-a915db7beca87198fcd7860086989fe8a327a1a4f6508025b64ab28fcc7423b2
env:
- name: MONGODB_USER
value: user
- name: MONGODB_PASSWORD
value: password
- name: MONGODB_DATABASE
value: guestbook
- name: MONGODB_ADMIN_PASSWORD
value: password
endpoints:
- name: mongodb
exposure: internal
targetPort: 27017
attributes:
discoverable: 'true'
memoryLimit: 512Mi
mountSources: true
volumeMounts:
- name: mongo-storage
path: /var/lib/mongodb/data
- name: mongo-storage
volume:
size: 256Mi
commands:
- id: run-application
exec:
label: "Run the application"
component: tools
workingDir: ${PROJECT_SOURCE}
commandLine: "npm install && node --inspect=9229 app.js"
group:
kind: run