mirror of
https://github.com/michaelthomson0797/fleet-infra.git
synced 2026-02-04 13:09:53 +00:00
roundcube nginx
This commit is contained in:
@@ -6,6 +6,7 @@ metadata:
|
||||
labels:
|
||||
service: roundcubemail
|
||||
spec:
|
||||
type: NodePort
|
||||
ports:
|
||||
- port: 9000
|
||||
protocol: TCP
|
||||
|
||||
33
roundcube/roundcubenginx-config.yaml
Normal file
33
roundcube/roundcubenginx-config.yaml
Normal file
@@ -0,0 +1,33 @@
|
||||
apiVersion: v1
|
||||
kind: ConfigMap
|
||||
metadata:
|
||||
name: roundcubenginx-config
|
||||
namespace: roundcube
|
||||
data:
|
||||
default.conf: |
|
||||
server {
|
||||
listen 80 default_server;
|
||||
server_name _;
|
||||
root /var/www/html;
|
||||
|
||||
location / {
|
||||
try_files $uri /index.php$is_args$args;
|
||||
}
|
||||
|
||||
location ~ \.php(/|$) {
|
||||
try_files $uri =404;
|
||||
fastcgi_pass roundcubemail:9000;
|
||||
fastcgi_read_timeout 300;
|
||||
proxy_read_timeout 300;
|
||||
fastcgi_split_path_info ^(.+\.php)(/.*)$;
|
||||
include fastcgi_params;
|
||||
fastcgi_param SCRIPT_FILENAME $realpath_root$fastcgi_script_name;
|
||||
fastcgi_param DOCUMENT_ROOT $realpath_root;
|
||||
internal;
|
||||
}
|
||||
|
||||
client_max_body_size 6m;
|
||||
|
||||
error_log /var/log/nginx/error.log;
|
||||
access_log /var/log/nginx/access.log;
|
||||
}
|
||||
45
roundcube/roundcubenginx-deployment.yaml
Normal file
45
roundcube/roundcubenginx-deployment.yaml
Normal file
@@ -0,0 +1,45 @@
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: roundcubenginx
|
||||
namespace: roundcube
|
||||
labels:
|
||||
service: roundcubenginx
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
service: roundcubenginx
|
||||
strategy:
|
||||
type: Recreate
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
service: roundcubenginx
|
||||
spec:
|
||||
containers:
|
||||
- name: roundcubenginx
|
||||
image: nginx:alpine
|
||||
imagePullPolicy: ""
|
||||
env:
|
||||
- name: NGINX_HOST
|
||||
value: localhost
|
||||
- name: NGINX_PHP_CGI
|
||||
value: roundcubemail:9000
|
||||
ports:
|
||||
- containerPort: 80
|
||||
volumeMounts:
|
||||
- name: www-data
|
||||
mountPath: /var/www/html
|
||||
- name: nginx-config
|
||||
mountPath: /etc/nginx/conf.d/default.conf
|
||||
subPath: default.conf
|
||||
restartPolicy: Always
|
||||
serviceAccountName: ""
|
||||
volumes:
|
||||
- name: www-data
|
||||
persistentVolumeClaim:
|
||||
claimName: roundcubemail-www-pvc
|
||||
- name: nginx-config
|
||||
configMap:
|
||||
name: roundcubenginx-config
|
||||
@@ -1,14 +1,14 @@
|
||||
apiVersion: networking.k8s.io/v1
|
||||
kind: Ingress
|
||||
metadata:
|
||||
name: roundcubemail-ingress
|
||||
name: roundcubenginx-ingress
|
||||
namespace: roundcube
|
||||
annotations:
|
||||
traefik.ingress.kubernetes.io/router.entrypoints: websecure
|
||||
# traefik.ingress.kubernetes.io/router.middlewares: traefik-authentik@kubernetescrd
|
||||
traefik.ingress.kubernetes.io/router.tls: "true"
|
||||
labels:
|
||||
service: roundcubemail
|
||||
service: roundcubenginx
|
||||
spec:
|
||||
rules:
|
||||
- host: roundcube.michaelthomson.dev
|
||||
@@ -18,7 +18,7 @@ spec:
|
||||
path: /
|
||||
backend:
|
||||
service:
|
||||
name: roundcubemail
|
||||
name: roundcubenginx
|
||||
port:
|
||||
name: http
|
||||
tls:
|
||||
14
roundcube/roundcubenginx-service.yaml
Normal file
14
roundcube/roundcubenginx-service.yaml
Normal file
@@ -0,0 +1,14 @@
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: roundcubenginx
|
||||
namespace: roundcube
|
||||
labels:
|
||||
service: roundcubenginx
|
||||
spec:
|
||||
ports:
|
||||
- name: http
|
||||
port: 8080
|
||||
targetPort: 80
|
||||
selector:
|
||||
service: roundcubenginx
|
||||
Reference in New Issue
Block a user