You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
134 lines
3.9 KiB
134 lines
3.9 KiB
################
|
|
# 服务器配置
|
|
################
|
|
|
|
# 设置运行环境
|
|
# 可以设置的值有 dev、prod
|
|
APP_ENV=dev
|
|
|
|
# 设置运行时区
|
|
# TIME_ZONE=Asia/Shanghai
|
|
|
|
# 服务器监听的地址
|
|
# 默认值为 0.0.0.0
|
|
#
|
|
# SERVER_ADDR=0.0.0.0
|
|
|
|
# 服务器监听的端口
|
|
# 默认值为 1234
|
|
#
|
|
# SERVER_PORT=1234
|
|
|
|
# 允许的报头大小上限
|
|
# 默认值为 Golang 标准库定义的值 `http.DefaultMaxHeaderBytes`
|
|
#
|
|
# HTTP_MAX_HEADER_BYTES=
|
|
|
|
# 写超时,如果提供流服务,切勿设置该值。
|
|
#
|
|
# HTTP_WRITE_TIMEOUT=
|
|
|
|
# 读超时,暂时不建议设置
|
|
# HTTP_READ_TIMEOUT=
|
|
|
|
# 闲置超时,暂时不建议设置
|
|
# HTTP_IDLE_TIMEOUT=
|
|
|
|
##################
|
|
# 数据库配置
|
|
##################
|
|
|
|
DB_DRIVER=postgres
|
|
|
|
# 数据库表前缀
|
|
DB_PREFIX=ims_
|
|
|
|
# 数据库存储引擎
|
|
# DB_STORE_ENGINE=InnoDB
|
|
|
|
DB_USER=postgres
|
|
DB_AUTH=password
|
|
DB_HOST=localhost
|
|
DB_PORT=5432
|
|
DB_NAME=postgres
|
|
|
|
DB_PUBLIC_SCHEMA=public
|
|
|
|
# DB_CHARSET=utf8mb4 # 数据库字符类型,仅支持 mysql
|
|
# DB_STRING_SIZE=256 # 数据库字符串类型长度,仅支持 mysql
|
|
# DB_SSLMODE=disable # 数据库SSL模式,仅支持 postgres
|
|
# DB_SINGULAR_TABLE=false
|
|
# DB_IDENTIFIER_MAX_LENGTH=0
|
|
# DB_QUERY_FIELDS=true
|
|
# DB_DISABLE_FOREIGN_KEY_CONSTRAINT=false
|
|
# DB_IGNORE_RELATIONSHIPS=false
|
|
# DB_MAX_IDLE_CONNS=
|
|
# DB_MAX_OPEN_CONNS=
|
|
# DB_CONN_MAX_LIFETIME=
|
|
|
|
|
|
################
|
|
# 跨域设置
|
|
################
|
|
|
|
CORS_EXPOSE_HEADERS=X-Token-Expired
|
|
|
|
|
|
################
|
|
# 授权认证
|
|
################
|
|
|
|
# 在线获取公私钥网站 https://travistidwell.com/jsencrypt/demo/
|
|
# 或者使用 scripts/rs256/rs256.go 生成
|
|
|
|
# 授权令牌私钥
|
|
JWT_PRIVATE_KEY="-----BEGIN PRIVATE KEY-----
|
|
MIIEogIBAAKCAQEAq04SRRhAjKD9DjQANg4cPIyTUGU732ExlVeDEaee7RhNsHNH
|
|
4FfwYJqU60LFEN5WVoYIJ4pFgZD2GgIlLRAWZm/MtUcKRTG2U0wnsy5bgoLwaWWK
|
|
iKOUljyXi8P+wzucUYtTCm+/cI9Iz1BKNm8gJ62Af4UCURN1jecw/hfb6TsdSb+E
|
|
56Al31Jce9XXXxPu4WOUnnKtK5SNsOF6jzVMo4C/cdqEyX4Yss2QIn9L9bcNsXZR
|
|
U4QHe2fstPj0FnvkYCz2KcWMnImwMfL8mFY7aXilxeqeTfqVz2vXVTTI4sKjvEbC
|
|
Ag+kBdgT7NOmQpqrTqeBRuNvoEPgtvAwGVSOtwIDAQABAoIBAFKWdSByrMwf4WCz
|
|
mVZ2Pw7CB1O/OrpbNXh2lG4yjeBo0yu6qHB0dSNd42X47uFPD/ju7YeCljf9F2k6
|
|
l4m+M853IA5VjZIGgYxvLsSoGN43Goj1t3BgzQYReE6d03l0h8yYixSBA57UtZmd
|
|
b+oGcU4vy7+u9Ir6ArbDO0+FWTR7zQ3IvWJx0vwPjVLgeLY5hj8B7yEtE01aVvAI
|
|
6JyNgleuLcPDVAmbGvc9qYND92qSwQjUz1ljpZVPE8OP71K4KVnstBEONHd36Svp
|
|
jcHBw5ZePAbWvp+qLPco6O/wi/aDqHMXrhvyw+WJiawAZ2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04SRRhAjKD9DjQANg4cPIyTUGU732ExlVeDEaee7RhNsHNH4Ffw
|
|
YJqU60LFEN5WVoYIJ4pFgZD2GgIlLRAWZm/MtUcKRTG2U0wnsy5bgoLwaWWKiKOU
|
|
ljyXi8P+wzucUYtTCm+/cI9Iz1BKNm8gJ62Af4UCURN1jecw/hfb6TsdSb+E56Al
|
|
31Jce9XXXxPu4WOUnnKtK5SNsOF6jzVMo4C/cdqEyX4Yss2QIn9L9bcNsXZRU4QH
|
|
e2fstPj0FnvkYCz2KcWMnImwMfL8mFY7aXilxeqeTfqVz2vXVTTI4sKjvEbCAg+k
|
|
BdgT7NOmQpqrTqeBRuNvoEPgtvAwGVSOtwIDAQAB
|
|
-----END PUBLIC KEY-----"
|
|
|
|
# 令牌时长
|
|
JWT_TTL=168h
|
|
|
|
# 令牌签发者
|
|
JWT_ISSUER=slim
|
|
|
|
# 令牌主体
|
|
JWT_SUBJECT=slim
|
|
|
|
# 令牌受众,多个值可以使用逗号分开,比如:app,pc,wap,routine
|
|
# 若值为 '*' 表示所有。
|
|
JWT_AUDIENCE=*
|
|
|