38 lines
828 B
YAML
38 lines
828 B
YAML
|
# 应用版本,应与当前版本一致
|
||
|
version: {{ .Version }}
|
||
|
|
||
|
# 应用配置
|
||
|
app:
|
||
|
# 域名或IP
|
||
|
host: 0.0.0.0
|
||
|
# 端口
|
||
|
port: 7899
|
||
|
|
||
|
# 安全
|
||
|
security:
|
||
|
jwt:
|
||
|
# Token过期时间 (默认4小时)
|
||
|
expire: 14400
|
||
|
# Refresh Token过期时间 (默认24小时)
|
||
|
refresh-expire: 86400
|
||
|
# 以下字段指定key的文件路径
|
||
|
private-key: id_ecdsa
|
||
|
public-key: id_ecdsa.pub
|
||
|
# 允许额外的跨域请求
|
||
|
allow-CORS:
|
||
|
- "*"
|
||
|
|
||
|
# 数据库配置
|
||
|
database:
|
||
|
driver: sqlite3
|
||
|
dsn: file:drivelinked.db?cache=shared&mode=rwc
|
||
|
# DSN references
|
||
|
# sqlite3 https://github.com/mattn/go-sqlite3#dsn-examples
|
||
|
# mysql https://github.com/go-sql-driver/mysql#dsn-data-source-name
|
||
|
# postgres https://github.com/lib/pq
|
||
|
|
||
|
max-idle-conns: 20
|
||
|
max-open-conns: 50
|
||
|
# with unit sec
|
||
|
conn-max-life-time: 30
|