Skip to content

Instantly share code, notes, and snippets.

@kvii
Created October 4, 2023 03:51
Show Gist options
  • Save kvii/a1b16546c365dbb927a0d0e03570eb8b to your computer and use it in GitHub Desktop.
Save kvii/a1b16546c365dbb927a0d0e03570eb8b to your computer and use it in GitHub Desktop.
docker compose 启动单节点 consul 的示例代码
services:
# consul 注册中心、配置中心
consul:
image: hashicorp/consul:1.16.1
ports:
- 8500:8500
command:
- agent
- -server
- -ui
- -node=server-1
- -bootstrap-expect=1
- -client=0.0.0.0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment