From abf74b1e3a30d057d6f8422d8ebd94f8dd4237d9 Mon Sep 17 00:00:00 2001 From: Javier Evans Date: Mon, 13 Feb 2023 08:47:22 -0800 Subject: [PATCH] add in consul and consul config --- consul/client.json | 10 ++++++++++ consul/server.json | 12 ++++++++++++ docker-compose.yml | 24 ++++++++++++++++++++++++ 3 files changed, 46 insertions(+) create mode 100644 consul/client.json create mode 100644 consul/server.json diff --git a/consul/client.json b/consul/client.json new file mode 100644 index 0000000..7c60283 --- /dev/null +++ b/consul/client.json @@ -0,0 +1,10 @@ +{ + "node_name": "consul-client", + "data_dir": "/consul/data", + "retry_join": [ + "consul-server" + ], + "addresses": { + "http": "0.0.0.0" + } +} diff --git a/consul/server.json b/consul/server.json new file mode 100644 index 0000000..c8d3c7d --- /dev/null +++ b/consul/server.json @@ -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" + } +} diff --git a/docker-compose.yml b/docker-compose.yml index e1c34f0..51fcb58 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -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: