diff --git a/cloud/deploy/mysql.yml b/cloud/deploy/mysql.yml new file mode 100644 index 0000000..f68e508 --- /dev/null +++ b/cloud/deploy/mysql.yml @@ -0,0 +1,35 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: database +spec: + selector: + matchLabels: + app: database + template: + metadata: + labels: + app: database + spec: + containers: + - name: database + image: daocloud.io/library/mysql:5.7 + env: + - name: MYSQL_ROOT_PASSWORD + value: "123456" + resources: + limits: + memory: "500Mi" + cpu: "500m" + ports: + - containerPort: 3306 + +--- +service: + name: ruoyi-db + selector: + app: database + ports: + - protocol: TCP + port: 3306 + targetPort: 3306