用户文档
docker安装
docker run -d --name datart -v /home/data/datart/datart.conf:/datart/config/datart.conf -v /home/data/datart/files:/datart/files -v /home/data/datart/application-config.yml:/datart/config/profiles/application-config.yml -p 6601:6601 datart/datart
创建配置文件datart.conf
# ====== 应用数据库配置 ======
# 数据库IP或域名
datasource.ip=192.168.3.200
# 数据库端口
datasource.port=3306
# 数据库名称
datasource.database=datart
# 用户名
datasource.username=root
# 密码
datasource.password=123456
# ====== 应用服务器配置 ======
# 服务器端口
server.port=6601
# 服务器地址
# Web 服务所绑定的本机网卡地址,一般为内网地址
server.address=0.0.0.0
# ====== datart 全局配置 ======
# 应用主页地址
# 浏览器访问应用主页输入的地址,一般为公网地址
datart.address=https://datart.cpolar.cn
# Chrome WebDriver 地址
datart.webdriver-path=http://127.0.0.1:4444/wd/hub
# 是否允许注册账户
datart.user.register=true
# 注册账户时,是否需要邮件激活
datart.send-mail=false
# 注册邮件有效期/小时, 默认48小时
datart.register.expire-hours=
# 邀请邮件有效期/小时, 默认48小时
datart.invite.expire-hours=
# 租户管理模式:platform-平台(默认),team-团队
datart.tenant-management-mode=platform
创建application-config.yml
spring:
datasource:
driver-class-name: com.mysql.cj.jdbc.Driver
type: com.alibaba.druid.pool.DruidDataSource
url: jdbc:mysql://${datasource.ip:null}:${datasource.port:3306}/${datasource.database:datart}?&allowMultiQueries=true&characterEncoding=utf-8
username: ${datasource.username:root}
password: ${datasource.password:123456}
# security:
# oauth2:
# client:
# registration:
# cas:
# provider: cas
# client-id: "xxxxx"
# client-name: "Sign in with CAS"
# client-secret: "xxx"
# authorization-grant-type: authorization_code
# client-authentication-method: post
# redirect-uri: "{baseUrl}/login/oauth2/code/{registrationId}"
# scope: userinfo
# provider:
# cas:
# authorization-uri: https://cas.xxx.com/cas/oauth2.0/authorize
# token-uri: https://cas.xxx.com/cas/oauth2.0/accessToken
# user-info-uri: https://cas.xxx.com/cas/oauth2.0/profile
# user-name-attribute: id
# userMapping:
# email: "attributes.email"
# name: "attributes.name"
# avatar: "attributes.avatar"
# ldap config
# ldap:
# urls: ldap://{IP}:{PORT}
# base: xxx
# username: {username}
# password: {password}
# attribute-mapping:
# username: cn # 自定义登录用户名对应属性名
# mail config
mail:
host: smtp.qq.com
port: 465
username: mail_server_center@foxmail.com
fromAddress: mail_server_center@foxmail.com
password: etsdfbcagpbefwsfcfb
senderName: mail_server_center@foxmail.com
properties:
smtp:
starttls:
enable: true
required: true
auth: true
mail:
smtp:
ssl:
enable: true
# redis config
redis:
port: 6379
host: 192.168.3.200
server:
port: ${server.port:8080}
address: ${server.ip:0.0.0.0}
ssl:
enabled: false
key-store: keystore.p12 # Absolute path
key-store-password: password
keyStoreType: PKCS12
keyAlias: tomcat
datart:
migration:
enable: true # 是否开启数据库自动升级
server:
address: ${datart.address:http://127.0.0.1:8080}
# 租户管理模式:platform-平台(默认),team-团队
tenant-management-mode: platform
user:
register: true # 是否允许注册
active:
send-mail: ${datart.send-mail:false} # 注册用户时是否需要邮件验证激活
expire-hours: ${datart.register.expire-hours:48} # 注册邮件有效期/小时
invite:
expire-hours: ${datart.invite.expire-hours:48} # 邀请邮件有效期/小时
security:
token:
secret: "d@a$t%a^r&a*t" #加密密钥
timeout-min: 30 # 登录会话有效时长,单位:分钟。
env:
file-path: ${user.dir}/files # 服务端文件保存位置
screenshot:
timeout-seconds: 60
webdriver-type: CHROME
webdriver-path: ${datart.webdriver-path:}