mirror of https://github.com/go-sonic/sonic.git
You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
32 lines
1.0 KiB
YAML
32 lines
1.0 KiB
YAML
server:
|
|
host: 0.0.0.0
|
|
port: 8080
|
|
|
|
logging:
|
|
filename: sonic.log
|
|
level:
|
|
app: info # debug,info,warn,error
|
|
gorm: warn # info,warn,error,silent
|
|
maxsize: 10 # 单位 megabytes
|
|
maxage: 30 #单位 天
|
|
compress: false # 是否对旧日志使用gzip进行压缩
|
|
|
|
|
|
### 数据库配置, MySQL 和 SQLite3 二选一 .如果同时配置了MySQL 或 SQLite3 ,优先使用 Sqlite3
|
|
### The Database configuration,You should choose one between MySQL and SQLite3,if bothMySQL and SQLite3 are configured ,use Sqlite3 first
|
|
sqlite3:
|
|
enable: true
|
|
|
|
|
|
mysql:
|
|
host: 127.0.0.1
|
|
port: 3306
|
|
db: sonicdb
|
|
username: "root"
|
|
password: "12345678"
|
|
|
|
|
|
sonic:
|
|
mode: "production"
|
|
work_dir: "./" # 不填默认为当前路径,用来存放日志文件、数据库文件、模板、上传的附件等(The default is the current directory. Used to store log files, database files, templates, upload files)
|
|
log_dir: "./logs" # 不填则使用work_dir 路径下的log路径 (If it is empty, use the "log" path under work_dir) |