forked from digitopvn/diginext
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdeployment.docker.example.yaml
90 lines (89 loc) · 2.31 KB
/
deployment.docker.example.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
# SERVICE CONFIGURATION
apiVersion: v1
kind: Service
metadata:
name: diginext-svc
namespace: diginext
labels:
app: diginext
spec:
# type: NodePort
ports:
- port: 6969
selector:
app: diginext
---
# POD DEPLOYMENT CONFIGURATION
apiVersion: apps/v1
kind: Deployment
metadata:
name: diginext
namespace: diginext
spec:
replicas: 1
strategy:
type: RollingUpdate
rollingUpdate:
maxSurge: 1
maxUnavailable: 0
selector:
matchLabels:
app: diginext
template:
metadata:
labels:
app: diginext
spec:
containers:
- name: diginext
image: digitop/diginext:latest
ports:
- containerPort: 6969
securityContext:
# this is required for Docker but very dangerous !
privileged: true
runAsUser: 0
env:
- name: TZ
value: Asia/Ho_Chi_Minh
- name: PORT
value: "6969"
- name: NODE_ENV
value: production
- name: CLI_MODE
value: server
- name: DEV_MODE
value: "false"
- name: BASE_URL
value: https://api.dxup.dev
- name: DB_URI
value: # mongodb://... insert here
- name: JWT_SECRET
value: # insert here
- name: JWT_EXPIRE_TIME
value: 48h
- name: GOOGLE_CLIENT_ID
value: # insert here
- name: GOOGLE_CLIENT_SECRET
value: # insert here
- name: BUILDER
value: docker
volumeMounts:
# this is required for Docker but very dangerous !
- name: docker-sock
mountPath: /var/run/docker.sock
- name: storage
mountPath: /var/app/storage
# - name: home
# mountPath: /root
volumes:
# this is required for Docker but very dangerous !
- name: docker-sock
hostPath:
path: "/var/run/docker.sock"
- name: storage
hostPath:
path: /home/dev/diginext/storage
- name: home
hostPath:
path: /home/dev/diginext/storage/home