From 8a3b7caf7c4e6843393e1c801032ece92e17b2c0 Mon Sep 17 00:00:00 2001 From: Fabian Date: Wed, 1 Apr 2020 00:22:27 +0200 Subject: [PATCH] PRODUCER_KNOWNCONSUMER --- consumer | 2 +- docker-compose.yml | 19 ++++++++++++++----- 2 files changed, 15 insertions(+), 6 deletions(-) diff --git a/consumer b/consumer index 990f2ce..cd22def 160000 --- a/consumer +++ b/consumer @@ -1 +1 @@ -Subproject commit 990f2ce8fa3da1e492048dd374a285a72e562d62 +Subproject commit cd22def9c8877bac4bd0561be9d8fc4e8f3fceab diff --git a/docker-compose.yml b/docker-compose.yml index 5cc000b..7a6a853 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -12,20 +12,28 @@ networks: services: producer1: image: tormachris/producer + environment: + - PRODUCER_KNOWNCONSUMER=192.168.1.21 networks: firstsubnet: ipv4_address: 192.168.1.11 + depends_on: + - consumer-api1 producer2: image: tormachris/producer + environment: + - PRODUCER_KNOWNCONSUMER=192.168.1.22 networks: firstsubnet: ipv4_address: 192.168.1.12 + depends_on: + - consumer-api2 consumer-api1: image: tormachris/consumer_api environment: - - REDIS_URL=redis://192.168.1.31 - - LOCAL_UUID=31 + - REDIS_URL=redis://localhost + - LOCAL_UUID=d8b2e5e2-f675-4194-9324-af58e4b70c54 networks: firstsubnet: ipv4_address: 192.168.1.21 @@ -33,8 +41,8 @@ services: consumer-api2: image: tormachris/consumer_api environment: - - REDIS_URL=redis://192.168.1.32 - - LOCAL_UUID=32 + - REDIS_URL=redis://localhost + - LOCAL_UUID=9e79d4e7-f4c2-44d2-ac11-682f62fda985 networks: firstsubnet: ipv4_address: 192.168.1.22 @@ -44,7 +52,7 @@ services: environment: - REDIS_URL=redis://192.168.1.31 - INITIAL_SERVERS=192.168.1.22 - + - LOCAL_UUID=9d14f9c5-9884-4a57-8ed3-0c4bbd5ffcc4 network_mode: "service:consumer-api1" consumer-scheduler2: @@ -52,6 +60,7 @@ services: environment: - REDIS_URL=redis://192.168.1.32 - INITIAL_SERVERS=192.168.1.21 + - LOCAL_UUID=8401c20b-e40b-43c5-af91-1376f4be7905 network_mode: "service:consumer-api2" redis1: