2020-03-31 23:09:21 +02:00
|
|
|
version: '3.4'
|
2020-03-09 16:52:27 +01:00
|
|
|
|
|
|
|
networks:
|
2020-03-31 23:09:21 +02:00
|
|
|
firstsubnet:
|
2020-03-31 23:55:52 +02:00
|
|
|
external: false
|
2020-03-31 23:09:21 +02:00
|
|
|
driver: bridge
|
|
|
|
ipam:
|
|
|
|
driver: default
|
|
|
|
config:
|
2020-03-31 23:55:52 +02:00
|
|
|
- subnet: 192.168.1.0/24
|
2020-03-09 16:52:27 +01:00
|
|
|
|
|
|
|
services:
|
2020-04-01 01:51:52 +02:00
|
|
|
producer1-1:
|
2020-03-31 23:55:52 +02:00
|
|
|
image: tormachris/producer
|
2020-04-01 00:22:27 +02:00
|
|
|
environment:
|
|
|
|
- PRODUCER_KNOWNCONSUMER=192.168.1.21
|
2020-03-31 23:09:21 +02:00
|
|
|
networks:
|
|
|
|
firstsubnet:
|
|
|
|
ipv4_address: 192.168.1.11
|
2020-04-01 00:22:27 +02:00
|
|
|
depends_on:
|
|
|
|
- consumer-api1
|
2020-04-01 01:51:52 +02:00
|
|
|
|
|
|
|
producer1-2:
|
|
|
|
image: tormachris/producer
|
|
|
|
environment:
|
|
|
|
- PRODUCER_KNOWNCONSUMER=192.168.1.21
|
|
|
|
networks:
|
|
|
|
firstsubnet:
|
|
|
|
ipv4_address: 192.168.1.10
|
|
|
|
depends_on:
|
|
|
|
- consumer-api1
|
|
|
|
|
|
|
|
producer1-3:
|
|
|
|
image: tormachris/producer
|
|
|
|
environment:
|
|
|
|
- PRODUCER_KNOWNCONSUMER=192.168.1.21
|
|
|
|
networks:
|
|
|
|
firstsubnet:
|
|
|
|
ipv4_address: 192.168.1.9
|
|
|
|
depends_on:
|
|
|
|
- consumer-api1
|
|
|
|
|
|
|
|
|
|
|
|
producer2-1:
|
2020-03-31 23:55:52 +02:00
|
|
|
image: tormachris/producer
|
2020-04-01 00:22:27 +02:00
|
|
|
environment:
|
|
|
|
- PRODUCER_KNOWNCONSUMER=192.168.1.22
|
2020-03-31 23:09:21 +02:00
|
|
|
networks:
|
|
|
|
firstsubnet:
|
|
|
|
ipv4_address: 192.168.1.12
|
2020-04-01 00:22:27 +02:00
|
|
|
depends_on:
|
|
|
|
- consumer-api2
|
2020-03-09 16:52:27 +01:00
|
|
|
|
2020-04-01 01:51:52 +02:00
|
|
|
producer2-2:
|
|
|
|
image: tormachris/producer
|
|
|
|
environment:
|
|
|
|
- PRODUCER_KNOWNCONSUMER=192.168.1.22
|
|
|
|
networks:
|
|
|
|
firstsubnet:
|
|
|
|
ipv4_address: 192.168.1.13
|
|
|
|
depends_on:
|
|
|
|
- consumer-api2
|
|
|
|
|
|
|
|
producer2-3:
|
|
|
|
image: tormachris/producer
|
|
|
|
environment:
|
|
|
|
- PRODUCER_KNOWNCONSUMER=192.168.1.22
|
|
|
|
networks:
|
|
|
|
firstsubnet:
|
|
|
|
ipv4_address: 192.168.1.14
|
|
|
|
depends_on:
|
|
|
|
- consumer-api2
|
|
|
|
|
2020-03-31 23:55:52 +02:00
|
|
|
consumer-api1:
|
|
|
|
image: tormachris/consumer_api
|
2020-03-31 23:09:21 +02:00
|
|
|
environment:
|
2020-04-01 00:22:27 +02:00
|
|
|
- REDIS_URL=redis://localhost
|
|
|
|
- LOCAL_UUID=d8b2e5e2-f675-4194-9324-af58e4b70c54
|
2020-03-31 23:09:21 +02:00
|
|
|
networks:
|
|
|
|
firstsubnet:
|
|
|
|
ipv4_address: 192.168.1.21
|
|
|
|
|
2020-03-31 23:55:52 +02:00
|
|
|
consumer-api2:
|
|
|
|
image: tormachris/consumer_api
|
|
|
|
environment:
|
2020-04-01 00:22:27 +02:00
|
|
|
- REDIS_URL=redis://localhost
|
|
|
|
- LOCAL_UUID=9e79d4e7-f4c2-44d2-ac11-682f62fda985
|
2020-03-31 23:09:21 +02:00
|
|
|
networks:
|
|
|
|
firstsubnet:
|
|
|
|
ipv4_address: 192.168.1.22
|
|
|
|
|
2020-04-01 01:51:52 +02:00
|
|
|
|
2020-03-31 23:55:52 +02:00
|
|
|
consumer-scheduler1:
|
|
|
|
image: tormachris/consumer-scheduler
|
|
|
|
environment:
|
|
|
|
- REDIS_URL=redis://192.168.1.31
|
|
|
|
- INITIAL_SERVERS=192.168.1.22
|
2020-04-01 00:22:27 +02:00
|
|
|
- LOCAL_UUID=9d14f9c5-9884-4a57-8ed3-0c4bbd5ffcc4
|
2020-03-31 23:55:52 +02:00
|
|
|
network_mode: "service:consumer-api1"
|
|
|
|
|
|
|
|
consumer-scheduler2:
|
|
|
|
image: tormachris/consumer-scheduler
|
|
|
|
environment:
|
|
|
|
- REDIS_URL=redis://192.168.1.32
|
|
|
|
- INITIAL_SERVERS=192.168.1.21
|
2020-04-01 00:22:27 +02:00
|
|
|
- LOCAL_UUID=8401c20b-e40b-43c5-af91-1376f4be7905
|
2020-03-31 23:55:52 +02:00
|
|
|
network_mode: "service:consumer-api2"
|
|
|
|
|
2020-04-01 01:51:52 +02:00
|
|
|
|
2020-03-31 23:09:21 +02:00
|
|
|
redis1:
|
|
|
|
image: redis
|
2020-03-31 23:55:52 +02:00
|
|
|
network_mode: "service:consumer-api1"
|
2020-03-31 23:09:21 +02:00
|
|
|
|
|
|
|
redis2:
|
|
|
|
image: redis
|
2020-03-31 23:55:52 +02:00
|
|
|
network_mode: "service:consumer-api2"
|