kubernetes/worker/onlyoffice.yaml

64 lines
1.4 KiB
YAML

apiVersion: apps/v1
kind: Deployment
metadata:
name: onlyoffice
labels:
app: onlyoffice
spec:
replicas: 1
selector:
matchLabels:
app: onlyoffice
template:
metadata:
labels:
app: onlyoffice
spec:
containers:
- name: onlyoffice
image: onlyoffice/documentserver:7.1.1
ports:
- containerPort: 80
env:
- name: TZ
value: Asia/Shanghai
volumeMounts:
- mountPath: /var/log/onlyoffice
name: onlyofficelog
- mountPath: /var/www/onlyoffice/Data
name: onlyofficedata
- mountPath: /var/lib/onlyoffice
name: onlyofficelib
- mountPath: /var/lib/postgresql
name: onlyofficesql
volumes:
- name: onlyofficelog
nfs:
path: /data/onlyoffice/log
server: 10.9.12.250
- name: onlyofficedata
nfs:
path: /data/onlyoffice/data
server: 10.9.12.250
- name: onlyofficelib
nfs:
path: /data/onlyoffice/lib
server: 10.9.12.250
- name: onlyofficesql
nfs:
path: /data/onlyoffice/sql
server: 10.9.12.250
---
apiVersion: v1
kind: Service
metadata:
name: onlyoffice-service
spec:
selector:
app: onlyoffice
type: NodePort
ports:
- port: 80
targetPort: 80
nodePort: 30121