forked from font/pacman
-
Notifications
You must be signed in to change notification settings - Fork 2
/
devfile.yaml
91 lines (91 loc) · 2.22 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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
schemaVersion: 2.2.0
metadata:
name: nodejs-web-app
attributes:
persistVolumes: 'false'
projects:
- name: pacman
git:
remotes:
origin: 'https://github.com/gestrem/pacman.git'
attributes:
persistVolumes: 'false'
commands:
- name: 1. Download dependencies
actions:
- type: exec
component: nodejs
command: npm install
workdir: '${PROJECTS_ROOT}/nodejs-web-app/pacman'
- name: 2. Run the web app
actions:
- type: exec
component: nodejs
command: npm start
workdir: '${PROJECTS_ROOT}/nodejs-web-app/pacman'
components:
- name: nodejs
container:
image: registry.redhat.io/devspaces/udi-rhel8:3.8
endpoints:
- exposure: public
name: nodejs
protocol: http
targetPort: 8080
memoryLimit: '1Gi'
memoryRequest: '512Mi'
cpuLimit: '0.5'
cpuRequest: '0.25'
mountSources: true
volumeMounts:
- name: npm
path: /home/user/.npm
- name: npm
volume:
size: 1G
env:
- value: 220fd770-c028-480d-8f95-f84353c7d55a
name: SECRET
- value: production
name: NODE_ENV
- endpoints:
- attributes:
discoverable: 'true'
public: 'false'
name: mongodb-34-centos7
port: 27017
memoryLimit: 512Mi
type: dockerimage
volumes:
- name: mongo-storage
containerPath: /var/lib/mongodb/data
alias: mongo
image: docker.io/centos/mongodb-34-centos7
env:
- value: user
name: MONGODB_USER
- value: password
name: MONGODB_PASSWORD
- value: guestbook
name: MONGODB_DATABASE
- value: password
name: MONGODB_ADMIN_PASSWORD
- id: redhat/vscode-yaml/latest
type: chePlugin
- id: vscode/typescript-language-features/latest
type: chePlugin
- id: redhat/vscode-xml/latest
type: chePlugin
commands:
- name: 1. Download dependencies
actions:
- workdir: '${PROJECTS_ROOT}/pacman'
type: exec
command: npm install
component: nodejs
- name: 2. Run the web app
actions:
- workdir: '${PROJECTS_ROOT}/pacman'
type: exec
command: npm run start
component: nodejs