docker-compose.yml 1.56 KB
Newer Older
ham's avatar
ham committed
1 2 3
version: "3"

services:
hengwen's avatar
hengwen committed
4 5 6 7
  zoo1:
    image: zookeeper
    restart: always
    hostname: zoo1
ham's avatar
ham committed
8
    ports:
hengwen's avatar
hengwen committed
9 10 11 12 13 14 15
      - 2181:2181
    environment:
      ZOO_MY_ID: 1
      ZOO_SERVERS: server.1=0.0.0.0:2888:3888

  kafka:
    image: wurstmeister/kafka
ham's avatar
ham committed
16
    depends_on:
hengwen's avatar
hengwen committed
17 18 19 20 21 22
      - zoo1
    ports:
      - 9092:9092
    environment:
      KAFKA_ADVERTISED_HOST_NAME: kafka
      KAFKA_ZOOKEEPER_CONNECT: zoo1:2181
ham's avatar
ham committed
23
    restart: always
hengwen's avatar
hengwen committed
24 25
    volumes:
      - /var/run/docker.sock:/var/run/docker.sock
ham's avatar
ham committed
26 27 28

  rmi-server:
    image: rmi-server:latest
hengwen's avatar
hengwen committed
29 30 31 32 33 34 35 36 37 38 39 40 41 42
    depends_on:
      - zoo1
#    ports:
#      - 10101:10101
    restart: always
#    hostname: rmi-server
    environment:
      ZOO_SERVERS: zoo1

  rpc-server1:
    image: rpc-server:latest
    depends_on:
      - kafka
      - zoo1
ham's avatar
ham committed
43
    ports:
hengwen's avatar
hengwen committed
44 45
      - 6000:6000
      - 8787:8787
ham's avatar
ham committed
46
    restart: always
hengwen's avatar
hengwen committed
47 48 49 50 51 52
    hostname: rpc1
    environment:
      ZOO_SERVERS: zoo1
      KAFKA_SERVERS: kafka:9092
    volumes:
      - ../rpc/target:/app
ham's avatar
ham committed
53

hengwen's avatar
hengwen committed
54 55 56 57 58 59 60 61 62 63 64
  rpc-server2:
    image: rpc-server:latest
    depends_on:
      - kafka
      - zoo1
    ports:
      - 6001:6000
#      - 8787:8787
    restart: always
    hostname: rpc2
    #    hostname: rmi-server
ham's avatar
ham committed
65
    environment:
hengwen's avatar
hengwen committed
66 67 68 69 70 71 72 73 74 75
      ZOO_SERVERS: zoo1
      KAFKA_SERVERS: kafka:9092
    volumes:
      - ../rpc/target:/app

  rpc-server3:
    image: rpc-server:latest
    depends_on:
      - kafka
      - zoo1
ham's avatar
ham committed
76
    ports:
hengwen's avatar
hengwen committed
77 78 79 80 81 82 83 84 85 86
      - 6002:6000
#      - 8787:8787
    restart: always
    hostname: rpc3
    #    hostname: rmi-server
    environment:
      ZOO_SERVERS: zoo1
      KAFKA_SERVERS: kafka:9092
    volumes:
      - ../rpc/target:/app