-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path06-node-deployment.yaml
41 lines (41 loc) · 996 Bytes
/
06-node-deployment.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
apiVersion: apps/v1
kind: Deployment
metadata:
name: node-app
labels:
name: node-app
spec:
replicas: 1
selector:
matchLabels:
app: node-app
template:
metadata:
labels:
app: node-app
spec:
containers:
- name: node-app
image: your-node-app-docker-image # change for your image app
imagePullPolicy: IfNotPresent
env:
- name: NODE_ENV
value: "develop"
- name: PORT
value: "3022" # change for your app port
- name: POSTGRES_USER
valueFrom:
secretKeyRef:
name: postgres-credentials
key: user
- name: POSTGRES_PASSWORD
valueFrom:
secretKeyRef:
name: postgres-credentials
key: password
- name: POSTGRES_DB
valueFrom:
secretKeyRef:
name: postgres-credentials
key: dbname
restartPolicy: Always