-
Notifications
You must be signed in to change notification settings - Fork 6
/
fpm-nginx.k8s.yml
125 lines (113 loc) · 2.68 KB
/
fpm-nginx.k8s.yml
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
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
kind: Service
apiVersion: v1
metadata:
name: roundcube
labels:
app: roundcube
spec:
selector:
app: roundcube
ports:
- name: http
port: 80
targetPort: http
---
kind: ConfigMap
apiVersion: v1
metadata:
name: roundcube.config
labels:
app: roundcube
data:
roundcube.config.php: |
<?php
$config = [];
$config['db_dsnw'] = 'sqlite:////var/db/roundcube.db?mode=0640';
$config['des_key'] = 'Change_me_I_am_example!!';
$config['plugins'] = [
'archive',
'zipdownload',
];
nginx.vh.conf: |
server {
listen 80;
root /var/www/html;
index index.php;
charset utf-8;
location = /favicon.ico {
root /var/www/html/skins/larry/images;
access_log off;
log_not_found off;
expires max;
}
location = /robots.txt {
allow all;
access_log off;
log_not_found off;
}
location / {
try_files $uri $uri/ index.php;
}
location ~ /\.ht {
deny all;
access_log off;
log_not_found off;
}
location ~* \.php$ {
try_files $uri =404;
include fastcgi_params;
fastcgi_split_path_info ^(.+\.php)(/.+)$;
fastcgi_pass localhost:9000;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_index index.php;
}
}
---
kind: Deployment
apiVersion: apps/v1
metadata:
name: roundcube
labels:
app: roundcube
spec:
selector:
matchLabels:
app: roundcube
template:
metadata:
labels:
app: roundcube
version: 'fpm'
spec:
containers:
- name: roundcube
image: instrumentisto/roundcube:fpm
env:
- name: SHARE_APP
value: '1'
volumeMounts:
- name: config
subPath: roundcube.config.php
mountPath: /app/config/config.inc.php
readOnly: true
- name: src
mountPath: /shared
- name: nginx
image: nginx:stable-alpine
ports:
- name: http
containerPort: 80
volumeMounts:
- name: config
subPath: nginx.vh.conf
mountPath: /etc/nginx/conf.d/default.conf
readOnly: true
- name: src
mountPath: /var/www
readOnly: true
volumes:
- name: config
configMap:
name: roundcube.config
- name: src
emptyDir: {}