如何在Consul配置文件中指定绑定配置?

时间:2019-09-13 17:15:36

标签: consul

{
  "data_dir": "/tmp2/consul",
  "log_level": "INFO",
  "server": true,
  "node_name": "master",
  "addresses": {
    "https": "127.0.0.1"
  },
  "bind": "127.0.0.1"
}

给我一​​个错误:

consul agent -config-file=cfg.json
==> Error parsing cfg.json: 1 error(s) occurred:

* invalid config key bind

相对于命令行参数,是否有可用于JSON配置文件的文档?

1 个答案:

答案 0 :(得分:0)

https://www.consul.io/docs/agent/options.html#configuration-key-reference

bind_addr Equivalent to the -bind command-line flag.