ferry工单系统整理
1.参考连接
按照文档修改相应配置文件即可
备注1.:settings.yml
用授权吗,不能用明文密码
![](https://img2022.cnblogs.com/blog/1268491/202204/1268491-20220427174251778-1014255475.png)
备注2:邮件报错: "msg":"x509: certificate signed by unknown authority"}
Linux下发送邮件x509: certificate signed by unknown authority · Issue #I400DK · feiyu563/PrometheusAlert -
然后重新编译即可
vim pkg/notify/email/email.go
![](https://img2022.cnblogs.com/blog/1268491/202204/1268491-20220427174328238-619808134.png)
备注3:邮件超链接设置
Rul改成访问地址即可
备注4: 提示如下错误,需要修改数据库字段
Error 1054: Unknown column ‘status’ in ‘field list’
CREATE TABLE `p_work_order_circulation_history` ( `id` int(11) NOT NULL AUTO_INCREMENT, `create_time` timestamp NULL DEFAULT NULL, `update_time` timestamp NULL DEFAULT NULL, `delete_time` timestamp NULL DEFAULT NULL, `title` varchar(128) DEFAULT NULL, `work_order` int(11) DEFAULT NULL, `state` varchar(128) DEFAULT NULL, `source` varchar(128) DEFAULT NULL, `target` varchar(128) DEFAULT NULL, `circulation` varchar(128) DEFAULT NULL, `status` int(11) DEFAULT NULL, `processor` varchar(45) DEFAULT NULL, `processor_id` int(11) DEFAULT NULL, `cost_duration` varchar(128) DEFAULT NULL, `remarks` longtext, PRIMARY KEY (`id`), KEY `idx_p_work_order_circulation_history_delete_time` (`delete_time`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ;
![](https://images.cnblogs.com/OutliningIndicators/ContractedBlock.gif)
version: "3"
services:
db:
hostname: mysql
container_name: ferry_mysql
image: mysql:5.7
restart: unless-stopped
environment:
- TZ=Asia/Shanghai
- MYSQL_ROOT_PASSWORD=123456
- MYSQL_DATABASE=ferry
volumes:
- ./data/mysql/data:/var/lib/mysql # 映射数据库保存目录到宿主机,防止数据丢失
command:
[
"--character-set-server=utf8mb4",
"--collation-server=utf8mb4_unicode_ci",
]
redis:
hostname: redis
image: redis:6
container_name: ferry_redis
restart: unless-stopped
environment:
- TZ=Asia/Shanghai
volumes:
- ./data/redis/data:/var/lib/redis/data
ferry_backend:
hostname: ferry_backend
image: ferry:latest
container_name: ferry_backend
build: .
depends_on:
- db
- redis
links:
- db:ferry_mysql
- redis:ferry_redis
ports:
- 8002:8002
volumes:
- ./data/config:/opt/ferry/config
- ./data/logs:/opt/ferry/logs
- ./static/template:/opt/ferry/static/template
environment:
- TZ=Asia/Shanghai
restart: unless-stopped
ferry_web:
hostname: ferry_web
container_name: ferry_web
image: ferry_web:latest
links:
- ferry_backend:ferry_backend
ports:
- 8001:8001
environment:
- LISTEN_DOMAIN=localhost
- TZ=Asia/Shanghai
restart: unless-stopped