Skip to content

Commit

Permalink
add in consul and consul config
Browse files Browse the repository at this point in the history
  • Loading branch information
4141done committed Oct 4, 2023
1 parent 56aa89e commit abf74b1
Show file tree
Hide file tree
Showing 3 changed files with 46 additions and 0 deletions.
10 changes: 10 additions & 0 deletions consul/client.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"node_name": "consul-client",
"data_dir": "/consul/data",
"retry_join": [
"consul-server"
],
"addresses": {
"http": "0.0.0.0"
}
}
12 changes: 12 additions & 0 deletions consul/server.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"node_name": "consul-server",
"server": true,
"bootstrap": true,
"ui_config": {
"enabled": true
},
"data_dir": "/consul/data",
"addresses": {
"http": "0.0.0.0"
}
}
24 changes: 24 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,30 @@ services:
networks:
- mm_2023

consul-server:
image: hashicorp/consul:1.14.4
container_name: consul-server
restart: always
volumes:
- ./consul/server.json:/consul/config/server.json:ro
networks:
- mm_2023
ports:
- 8500:8500
- 8600:8600/tcp
- 8600:8600/udp
command: agent

consul-client:
image: hashicorp/consul:1.14.4
container_name: consul-client
restart: always
volumes:
- ./consul/client.json:/consul/config/client.json:ro
networks:
- mm_2023
command: agent

volumes:
rabbit-data:
rabbit-log:
Expand Down

0 comments on commit abf74b1

Please sign in to comment.