forked from devspaces-samples/nodejs-mongodb-sample
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdevfile.yaml
More file actions
58 lines (58 loc) · 1.47 KB
/
devfile.yaml
File metadata and controls
58 lines (58 loc) · 1.47 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
schemaVersion: 2.1.0
metadata:
name: nodejs-mongodb
components:
- name: nodejs
container:
image: registry.redhat.io/devspaces/udi-rhel8:3.4
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
memoryLimit: 1G
mountSources: true
volumeMounts:
- name: npm
path: /home/user/.npm
- name: npm
volume:
size: 1G
- name: mongo
container:
image: registry.redhat.io/rhscl/mongodb-36-rhel7:1-50
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
memoryLimit: 512Mi
mountSources: false
volumeMounts:
- name: mongo-storage
path: /var/lib/mongodb/data
- name: mongo-storage
volume:
size: 1G
commands:
- id: 1-run
exec:
label: "Run the application"
component: nodejs
workingDir: ${PROJECTS_ROOT}/nodejs-mongodb-sample
commandLine: "npm install && node --inspect=9229 app.js"
group:
kind: run