deploy.yaml 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. apiVersion: apps/v1
  2. kind: Deployment
  3. metadata:
  4. name: chatgpt-web
  5. labels:
  6. app: chatgpt-web
  7. spec:
  8. replicas: 1
  9. selector:
  10. matchLabels:
  11. app: chatgpt-web
  12. strategy:
  13. type: RollingUpdate
  14. template:
  15. metadata:
  16. labels:
  17. app: chatgpt-web
  18. spec:
  19. containers:
  20. - image: chenzhaoyu94/chatgpt-web
  21. name: chatgpt-web
  22. imagePullPolicy: Always
  23. ports:
  24. - containerPort: 3002
  25. env:
  26. - name: OPENAI_API_KEY
  27. value: sk-xxx
  28. - name: OPENAI_API_BASE_URL
  29. value: 'https://api.openai.com'
  30. - name: OPENAI_API_MODEL
  31. value: gpt-3.5-turbo
  32. - name: API_REVERSE_PROXY
  33. value: https://ai.fakeopen.com/api/conversation
  34. - name: AUTH_SECRET_KEY
  35. value: '123456'
  36. - name: TIMEOUT_MS
  37. value: '60000'
  38. - name: SOCKS_PROXY_HOST
  39. value: ''
  40. - name: SOCKS_PROXY_PORT
  41. value: ''
  42. - name: HTTPS_PROXY
  43. value: ''
  44. resources:
  45. limits:
  46. cpu: 500m
  47. memory: 500Mi
  48. requests:
  49. cpu: 300m
  50. memory: 300Mi
  51. ---
  52. apiVersion: v1
  53. kind: Service
  54. metadata:
  55. labels:
  56. app: chatgpt-web
  57. name: chatgpt-web
  58. spec:
  59. ports:
  60. - name: chatgpt-web
  61. port: 3002
  62. protocol: TCP
  63. targetPort: 3002
  64. selector:
  65. app: chatgpt-web
  66. type: ClusterIP