Docker
596417
使用华为云硬盘备份了禅道的文件,pod一旦重启,容器内的mysql就被初始化了,没有把禅道的数据库恢复已解决 悬赏5积分
提问者light
答案数2
阅读数509
发表时间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需要做下持久化映射出来的
回复
|
🧀 把mysql拿出来
|
联系我们
联系人
杨苗/高级客户经理
电话(微信)
13165050229
QQ号码
2692096539
联系邮箱
yangmiao@chandao.com