-
Notifications
You must be signed in to change notification settings - Fork 18
/
devfile.yaml
65 lines (65 loc) · 1.64 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
schemaVersion: 2.2.2
metadata:
name: nodejs-mongodb
components:
- name: nodejs
container:
image: registry.redhat.io/devspaces/udi-rhel9:3.19
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: '1Gi'
memoryRequest: '512Mi'
cpuLimit: '2'
cpuRequest: '1'
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'
memoryRequest: '256Mi'
cpuLimit: '1'
cpuRequest: '0.25'
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