apiVersion: apps/v1 kind: Deployment metadata: name: nginx namespace: dify labels: app: nginx spec: replicas: 1 strategy: type: Recreate selector: matchLabels: app: nginx template: metadata: labels: app: nginx spec: nodeName: prod102 enableServiceLinks: false containers: - name: nginx image: nginx:latest imagePullPolicy: IfNotPresent command: ["sh", "-c"] args: - "cp /docker-entrypoint-mount.sh /docker-entrypoint.sh && sed -i 's/\\r$//' /docker-entrypoint.sh && chmod +x /docker-entrypoint.sh && /docker-entrypoint.sh" ports: - containerPort: 80 hostPort: 8088 - containerPort: 443 hostPort: 18443 volumeMounts: - name: entry mountPath: /docker-entrypoint-mount.sh - name: confd mountPath: /etc/nginx/conf.d - name: nginx-conf mountPath: /etc/nginx/nginx.conf.template - name: proxy-conf mountPath: /etc/nginx/proxy.conf.template - name: https-conf mountPath: /etc/nginx/https.conf.template - name: ssl mountPath: /etc/ssl - name: certbot-conf mountPath: /etc/letsencrypt - name: certbot-live mountPath: /etc/letsencrypt/live - name: certbot-www mountPath: /var/www/html volumes: - name: entry hostPath: path: /usr/cluster/dify/src/docker/nginx/docker-entrypoint.sh type: File - name: confd hostPath: path: /usr/cluster/dify/src/docker/nginx/conf.d type: Directory - name: nginx-conf hostPath: path: /usr/cluster/dify/src/docker/nginx/nginx.conf.template type: File - name: proxy-conf hostPath: path: /usr/cluster/dify/src/docker/nginx/proxy.conf.template type: File - name: https-conf hostPath: path: /usr/cluster/dify/src/docker/nginx/https.conf.template type: File - name: ssl hostPath: path: /usr/cluster/dify/src/docker/nginx/ssl type: Directory - name: certbot-conf hostPath: path: /usr/cluster/dify/src/docker/volumes/certbot/conf type: DirectoryOrCreate - name: certbot-live hostPath: path: /usr/cluster/dify/src/docker/volumes/certbot/conf/live type: DirectoryOrCreate - name: certbot-www hostPath: path: /usr/cluster/dify/src/docker/volumes/certbot/www type: DirectoryOrCreate --- apiVersion: v1 kind: Service metadata: name: nginx namespace: dify spec: selector: app: nginx ports: - name: p80 port: 80 targetPort: 80 - name: p443 port: 443 targetPort: 443