-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathdep.yaml
51 lines (45 loc) · 1.19 KB
/
dep.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
apiVersion: apps/v1
kind: Deployment
metadata:
name: lab-app-app-deployment
labels:
app: lab-app
spec:
replicas: 1
selector:
matchLabels:
name: app-pod
app: lab-app
template:
metadata:
name: app-pod
labels:
name: app-pod
app: lab-app
spec:
containers:
- name: redis
image: redis
imagePullPolicy: Never
args: ["--appendonly yes"]
- name: app
image: mwendakith/lab:1.6
env:
- name: http_proxy
value: "http://10.230.50.110:3128"
- name: https_proxy
value: "http://10.230.50.110:3128"
volumeMounts:
- mountPath: /var/www/lab
name: app-data
ports:
- containerPort: 9000
lifecycle:
postStart:
exec:
command: ["/bin/sh", "-c", "composer install && php artisan key:generate && chmod 0777 -R /var/www/*/storage && chmod 0777 -R /var/www/*/public && chmod 0777 -R /var/www/*/vendor && chmod 0777 -R /var/www/*/bootstrap "]
volumes:
- name: app-data
hostPath:
path: /var/lib/docker/volumes/lab_myapp/_data/
type: Directory