Docker
596417使用华为云硬盘备份了禅道的文件,pod一旦重启,容器内的mysql就被初始化了,没有把禅道的数据库恢复已解决
使用华为云硬盘备份了禅道的文件,pod一旦重启,容器内的mysql就被初始化了,没有把禅道的数据库恢复已解决
悬赏5积分
提问者light答案数2阅读数848发表时间2023-05-12 12:05:52
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: chandao-pvc
namespace: lstack
spec:
accessModes:
- ReadWriteOnce
storageClassName: chandao-sas
resources:
requests:
storage: 1Gi
---
apiVersion: v1
kind: Service
metadata:
labels:
app: chandao
name: chandao-client
namespace: lstack
spec:
ports:
- name: chandao
port: 80
targetPort: 80
nodePort: 31526
- name: mysql
port: 3306
targetPort: 3306
nodePort: 31234
selector:
app: chandao
type: NodePort
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: chandao
namespace: lstack
labels:
app: chandao
spec:
selector:
matchLabels:
app: chandao
replicas: 1
template:
metadata:
labels:
app: chandao
spec:
containers:
- name: chandao
image: easysoft/zentao:18.3
resources:
requests:
memory: "2Gi"
cpu: "2000m"
env:
- name: MYSQL_ROOT_PASSWORD
value: '123456'
ports:
- name: chandao
containerPort: 80
- name: mysql
containerPort: 3306
volumeMounts:
- name: chandao
mountPath: /www/zentaopms
volumes:
- name: chandao
persistentVolumeClaim:
claimName: chandao-pvc
kind: PersistentVolumeClaim
metadata:
name: chandao-pvc
namespace: lstack
spec:
accessModes:
- ReadWriteOnce
storageClassName: chandao-sas
resources:
requests:
storage: 1Gi
---
apiVersion: v1
kind: Service
metadata:
labels:
app: chandao
name: chandao-client
namespace: lstack
spec:
ports:
- name: chandao
port: 80
targetPort: 80
nodePort: 31526
- name: mysql
port: 3306
targetPort: 3306
nodePort: 31234
selector:
app: chandao
type: NodePort
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: chandao
namespace: lstack
labels:
app: chandao
spec:
selector:
matchLabels:
app: chandao
replicas: 1
template:
metadata:
labels:
app: chandao
spec:
containers:
- name: chandao
image: easysoft/zentao:18.3
resources:
requests:
memory: "2Gi"
cpu: "2000m"
env:
- name: MYSQL_ROOT_PASSWORD
value: '123456'
ports:
- name: chandao
containerPort: 80
- name: mysql
containerPort: 3306
volumeMounts:
- name: chandao
mountPath: /www/zentaopms
volumes:
- name: chandao
persistentVolumeClaim:
claimName: chandao-pvc
禅道版本:禅道开源版 18.3
安装包类型:源码包
操作系统:CentOS
客户端浏览器:Chrome
答案列表
🚢 https://www.zentao.net/book/zentaopms/405.html 可以看下docker的安装文档,mysql的数据目录/var/lib/mysql需要做下持久化映射出来的 |
联系我们
联系人
刘璐/高级客户经理
电话(微信)
18562550650
QQ号码
2845263372
联系邮箱
liulu@chandao.com

其他相关问答
提问者: wx_63fc138369628 于 2023-03-021423次浏览,1个答案
提问者: m_660a3868239ec 于 2024-11-14709次浏览,1个答案
提问者: JOJO888 于 2025-03-10471次浏览,1个答案
提问者: m_6775f8ea4a5be 于 2025-01-02539次浏览,1个答案
提问者: m_66cfc7ce849df 于 2024-08-29915次浏览,1个答案
禅道-阿龙


精品资料包
1V1产品演示
免费试用增强功能
专属顾问答疑支持


