.
├── config
│ ├── docker.toml
│ ├── rbac.conf
│ └── resource.yaml
└── setup.sh
默认账号密码:clickvisual/clickvisual
/install/init
#!/bin/bash
clickvisual_version=1.0.2-rc2
docker kill clickvisual
docker rm clickvisual
docker run -d --net host \
--restart=always \
--name clickvisual \
-v /etc/timezone:/etc/timezone:ro \
-v /etc/localtime:/etc/localtime:ro \
-e EGO_CONFIG_PATH=/clickvisual/config/docker.toml \
-e EGO_LOG_WRITER=stderr \
-v $(pwd)/config/docker.toml:/clickvisual/config/docker.toml \
clickvisual/clickvisual:${clickvisual_version}
# -p 19001:19001 \
# -p 19006:19006 \
[app]
secretKey = "secretKey" # hashStatecode
rootURL = "http://localhost:19001"
baseURL = "/api/admin/login/"
# 菜单配置文件,酌情调整菜单权限文件路径
permissionFile = './config/resource.yaml'
# 日志查询中需要隐藏的元数据字段
hiddenFields = ["_cluster_", "_log_agent_", "_node_ip_", "_node_name_", "_time_second_", "_time_nanosecond_", "_source_"]
# 日志查询中需要显示的元数据字段
defaultFields = ["_namespace_","_container_name_","_pod_name_"]
# 限制最大查询时间跨度单位小时 0 或不填表示无限制
# queryLimitHours = 24
[casbin.rule]
path = "./config/rbac.conf"
[server.http]
host = "0.0.0.0"
port = 19001
embedPath = "dist"
maxAge = 86400
[server.governor]
host = "0.0.0.0"
port = 19011
[logger]
level = "debug"
name = "clickvisual.log"
[mysql]
connMaxLifetime = "300s"
debug = true
dsn = "root:password@tcp(192.168.1.1:3306)/clickvisual?charset=utf8mb4&collation=utf8mb4_general_ci&parseTime=True&loc=Local&readTimeout=1s&timeout=1s&writeTimeout=3s"
level = "panic"
maxIdleConns = 50
maxOpenConns = 100
[auth]
mode = "memstore" # redis memstore
name = "clickvisual_session"
debug = true
Keypairs = "secret"
# if use mode redis
# redisSize = 10
# redisNetwork = "tcp"
# redisAddr = ""
# redisPassword = ""
[auth.anonymous]
# enable anonymous access
enabled = false
[auth.proxy]
enabled = false
isAutoLogin = false
headerName = "X-CLICKVISUAL-USER"
headerNickName = "X-CLICKVISUAL-NICKNAME"
rootTokenKey = "X-CLICKVISUAL-TOKEN"
rootTokenValue = "xxx"
[[auth.tps]]
typ = "github"
enable = false
allowSignUp = true
clientId = ""
clientSecret = ""
scopes = ["user:email", "read:org"]
authUrl = "https://github.com/login/oauth/authorize"
tokenUrl = "https://github.com/login/oauth/access_token"
apiUrl = "https://api.github.com/user"
allowedDomains = []
teamIds = []
allowedOrganizations = []
[[auth.tps]]
typ = "gitlab"
enable = false
allowSignUp = true
clientId = ""
clientSecret = ""
scopes = ["api"]
authUrl = "https://gitlab.com/oauth/authorize"
tokenUrl = "https://gitlab.com/oauth/token"
apiUrl = "https://gitlab.com/api/v4"
allowedDomains = []
teamIds = []
allowedOrganizations = []
[prom2click]
enable = false
[[prom2click.cfgs]]
host = "127.0.0.1"
port = 19006
clickhouseDSN = "tcp://clickhouse:9000?username=root&password=shimo&read_timeout=10&write_timeout=10&debug=true"
clickhouseDB = "metrics"
clickhouseTable = "samples"
[defaultCh]
dsn="clickhouse://root:shimo@clickhouse:9000/default?max_execution_time=60"
在docker.toml
中修改mysql的配置