redis with consumer
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
Füleki Fábián 2020-03-31 23:55:52 +02:00
parent 23c24f0193
commit 25481bc67a

View File

@ -2,6 +2,7 @@ version: '3.4'
networks: networks:
firstsubnet: firstsubnet:
external: false
driver: bridge driver: bridge
ipam: ipam:
driver: default driver: default
@ -10,46 +11,53 @@ networks:
services: services:
producer1: producer1:
restart: unless-stopped image: tormachris/producer
image: tormachris/p2p-producer
networks: networks:
firstsubnet: firstsubnet:
ipv4_address: 192.168.1.11 ipv4_address: 192.168.1.11
producer2: producer2:
restart: unless-stopped image: tormachris/producer
image: tormachris/p2p-producer
networks: networks:
firstsubnet: firstsubnet:
ipv4_address: 192.168.1.12 ipv4_address: 192.168.1.12
consumer1: consumer-api1:
restart: unless-stopped image: tormachris/consumer_api
image: tormachris/p2p-consumer
environment: environment:
- REDIS_URL=192.168.1.31 - REDIS_URL=redis://192.168.1.31
- LOCAL_UUID=31
networks: networks:
firstsubnet: firstsubnet:
ipv4_address: 192.168.1.21 ipv4_address: 192.168.1.21
consumer2:
restart: unless-stopped
image: tormachris/p2p-consumer
environment:
- REDIS_URL=192.168.1.32
consumer-api2:
image: tormachris/consumer_api
environment:
- REDIS_URL=redis://192.168.1.32
- LOCAL_UUID=32
networks: networks:
firstsubnet: firstsubnet:
ipv4_address: 192.168.1.22 ipv4_address: 192.168.1.22
consumer-scheduler1:
image: tormachris/consumer-scheduler
environment:
- REDIS_URL=redis://192.168.1.31
- INITIAL_SERVERS=192.168.1.22
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
network_mode: "service:consumer-api2"
redis1: redis1:
image: redis image: redis
restart: unless-stopped network_mode: "service:consumer-api1"
networks:
firstsubnet:
ipv4_address: 192.168.1.31
redis2: redis2:
image: redis image: redis
restart: unless-stopped network_mode: "service:consumer-api2"
networks:
firstsubnet:
ipv4_address: 192.168.1.32