danswer/deployment/kubernetes/nginx-service-deployment.yaml
Yuhong Sun 590fbbc253
DAN-120 Kubernetes (#98)
Sample Kubernetes deployment with Auth default on
Also includes a bugfix for credentialed connectors with Auth turned on
2023-06-14 00:11:25 -07:00

53 lines
994 B
YAML

apiVersion: v1
kind: Service
metadata:
name: nginx-service
spec:
selector:
app: nginx
ports:
- name: http
protocol: TCP
port: 80
targetPort: 80
- name: danswer
protocol: TCP
port: 3000
targetPort: 80
type: LoadBalancer
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: nginx-deployment
spec:
replicas: 1
selector:
matchLabels:
app: nginx
template:
metadata:
labels:
app: nginx
spec:
containers:
- name: nginx
image: nginx:1.23.4-alpine
ports:
- containerPort: 80
env:
- name: DOMAIN
value: localhost
volumeMounts:
- name: nginx-conf
mountPath: /etc/nginx/conf.d
command:
- /bin/sh
- -c
- |
while :; do sleep 6h & wait $$!; nginx -s reload; done & nginx -g "daemon off;"
volumes:
- name: nginx-conf
configMap:
name: nginx-configmap