docker-compose.multipod.yml 1.86 KB
Newer Older
1 2
version: '2'
services:
3
  pod1: &pod_tpl
4 5 6 7 8 9 10
    image: gcr.io/google_containers/pause:0.8.0
    volumes:
      - /var/run
      - /var/lib/docker
      - /var/lib/beiran
    networks:
      - test
11 12

  docker1: &docker_tpl
13 14 15 16 17 18
    image: docker:18.03.0-ce-dind
    privileged: true
    command:  [ "-D" ]
    volumes_from:
      - pod1
    network_mode: "service:pod1"
19 20

  beiran1: &beiran_tpl
21
    image: dkr.beiran.io/beiran/beiran:dev
22 23 24
    volumes_from:
      - pod1
    network_mode: "service:pod1"
25
    environment:
26
      - BEIRAN_DISCOVERY_METHOD=zeroconf
27
      - BEIRAN_PLUGINS=beiran.plugins.discovery.zeroconf,package.docker
28
      - BEIRAN_LISTEN_ADDRESS=0.0.0.0
29

30
  pod2: *pod_tpl
31
  docker2:
32 33
    <<: *docker_tpl
    volumes_from: [ 'pod2' ]
34 35
    network_mode: "service:pod2"
  beiran2:
36 37
    <<: *beiran_tpl
    volumes_from: [ 'pod2' ]
38 39
    network_mode: "service:pod2"

40
  pod3: *pod_tpl
41
  docker3:
42 43
    <<: *docker_tpl
    volumes_from: [ 'pod3' ]
44
    network_mode: "service:pod3"
45
  beiran3:
46 47
    <<: *beiran_tpl
    volumes_from: [ 'pod3' ]
48 49
    network_mode: "service:pod3"

50
  pod4: *pod_tpl
51
  docker4:
52 53
    <<: *docker_tpl
    volumes_from: [ 'pod4' ]
54 55
    network_mode: "service:pod4"
  beiran4:
56 57
    <<: *beiran_tpl
    volumes_from: [ 'pod4' ]
58
    network_mode: "service:pod4"
59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88

  pod5: *pod_tpl
  docker5:
    <<: *docker_tpl
    volumes_from: [ 'pod5' ]
    network_mode: "service:pod5"
  beiran5:
    <<: *beiran_tpl
    volumes_from: [ 'pod5' ]
    network_mode: "service:pod5"

  pod6: *pod_tpl
  docker6:
    <<: *docker_tpl
    volumes_from: [ 'pod6' ]
    network_mode: "service:pod6"
  beiran6:
    <<: *beiran_tpl
    volumes_from: [ 'pod6' ]
    network_mode: "service:pod6"

  pod7: *pod_tpl
  docker7:
    <<: *docker_tpl
    volumes_from: [ 'pod7' ]
    network_mode: "service:pod7"
  beiran7:
    <<: *beiran_tpl
    volumes_from: [ 'pod7' ]
    network_mode: "service:pod7"
89

90 91
networks:
  test: