github.com/pingcap/ticdc@v0.0.0-20220526033649-485a10ef2652/docker-compose-mysql.yml (about)

     1  ---
     2      version: '2.1'
     3  
     4      services:
     5        controller:
     6          image: ticdc:latest
     7          build:
     8            context: .
     9            dockerfile: ./Dockerfile.development
    10          volumes:
    11            - /data
    12            - ./docker/logs:/logs
    13            - ./docker/config:/config
    14          environment:
    15            GO_FAILPOINTS: ${GO_FAILPOINTS}
    16          command: -c "/usr/bin/tail -f /dev/null"
    17          entrypoint: "/bin/sh"
    18          depends_on:
    19            - "upstream-tidb"
    20            - "downstream-tidb"
    21          restart: on-failure
    22  
    23        capturer0:
    24          image: ticdc:latest
    25          build:
    26            context: .
    27            dockerfile: ./Dockerfile.development
    28          volumes:
    29            - /data
    30            - ./docker/logs:/logs
    31          ports:
    32            - "8300:8300"
    33          environment:
    34            GO_FAILPOINTS: ${GO_FAILPOINTS}
    35          entrypoint: "/cdc server"
    36          command:
    37            - --addr=0.0.0.0:8300
    38            - --pd=http://upstream-pd:2379
    39            - --log-file=/logs/capturer0.log
    40            - --log-level=debug
    41            - --advertise-addr=capturer0:8300
    42          depends_on:
    43            - "upstream-tidb"
    44            - "downstream-tidb"
    45          restart: on-failure
    46  
    47        capturer1:
    48          image: ticdc:latest
    49          build:
    50            context: .
    51            dockerfile: ./Dockerfile.development
    52          volumes:
    53            - /data
    54            - ./docker/logs:/logs
    55          ports:
    56            - "8301:8300"
    57          environment:
    58            GO_FAILPOINTS: ${GO_FAILPOINTS}
    59          entrypoint: "/cdc server"
    60          command:
    61            - --addr=0.0.0.0:8300
    62            - --pd=http://upstream-pd:2379
    63            - --log-file=/logs/capturer1.log
    64            - --log-level=debug
    65            - --advertise-addr=capturer1:8300
    66          depends_on:
    67            - "upstream-tidb"
    68            - "downstream-tidb"
    69          restart: on-failure
    70  
    71        capturer2:
    72          image: ticdc:latest
    73          build:
    74            context: .
    75            dockerfile: ./Dockerfile.development
    76          volumes:
    77            - /data
    78            - ./docker/logs:/logs
    79          ports:
    80            - "8302:8300"
    81          environment:
    82            GO_FAILPOINTS: ${GO_FAILPOINTS}
    83          entrypoint: "/cdc server"
    84          command:
    85            - --addr=0.0.0.0:8300
    86            - --pd=http://upstream-pd:2379
    87            - --log-file=/logs/capturer2.log
    88            - --log-level=debug
    89            - --advertise-addr=capturer2:8300
    90          depends_on:
    91            - "upstream-tidb"
    92            - "downstream-tidb"
    93          restart: on-failure
    94  
    95        upstream-pd:
    96          image: pingcap/pd:nightly
    97          ports:
    98            - "2379:2379"
    99          volumes:
   100            - ./docker/config/pd.toml:/pd.toml:ro
   101            - /data
   102            - ./docker/logs:/logs
   103          command:
   104            - --name=upstream-pd
   105            - --client-urls=http://0.0.0.0:2379
   106            - --peer-urls=http://0.0.0.0:2380
   107            - --advertise-client-urls=http://upstream-pd:2379
   108            - --advertise-peer-urls=http://upstream-pd:2380
   109            - --initial-cluster=upstream-pd=http://upstream-pd:2380
   110            - --data-dir=/data/upstream-pd
   111            - --config=/pd.toml
   112            - --log-file=/logs/upstream-pd.log
   113          restart: on-failure
   114  
   115        upstream-tikv0:
   116          image: pingcap/tikv:nightly
   117          volumes:
   118            - ./docker/config/tikv.toml:/tikv.toml:ro
   119            - /data
   120            - ./docker/logs:/logs
   121          command:
   122            - --addr=0.0.0.0:20160
   123            - --advertise-addr=upstream-tikv0:20160
   124            - --data-dir=/data/upstream-tikv0
   125            - --pd=upstream-pd:2379
   126            - --config=/tikv.toml
   127            - --log-file=/logs/upstream-tikv0.log
   128          depends_on:
   129            - "upstream-pd"
   130          restart: on-failure
   131  
   132        upstream-tikv1:
   133          image: pingcap/tikv:nightly
   134          volumes:
   135            - ./docker/config/tikv.toml:/tikv.toml:ro
   136            - /data
   137            - ./docker/logs:/logs
   138          command:
   139            - --addr=0.0.0.0:20160
   140            - --advertise-addr=upstream-tikv1:20160
   141            - --data-dir=/data/upstream-tikv1
   142            - --pd=upstream-pd:2379
   143            - --config=/tikv.toml
   144            - --log-file=/logs/upstream-tikv1.log
   145          depends_on:
   146            - "upstream-pd"
   147          restart: on-failure
   148  
   149        upstream-tikv2:
   150          image: pingcap/tikv:nightly
   151          volumes:
   152            - ./docker/config/tikv.toml:/tikv.toml:ro
   153            - /data
   154            - ./docker/logs:/logs
   155          command:
   156            - --addr=0.0.0.0:20160
   157            - --advertise-addr=upstream-tikv2:20160
   158            - --data-dir=/data/upstream-tikv2
   159            - --pd=upstream-pd:2379
   160            - --config=/tikv.toml
   161            - --log-file=/logs/upstream-tikv2.log
   162          depends_on:
   163            - "upstream-pd"
   164          restart: on-failure
   165  
   166        upstream-tidb:
   167          image: pingcap/tidb:nightly
   168          ports:
   169            - "4000:4000"
   170            - "10080:10080"
   171          volumes:
   172            - ./docker/config/tidb.toml:/tidb.toml:ro
   173            - ./docker/logs:/logs
   174          command:
   175            - --store=tikv
   176            - --path=upstream-pd:2379
   177            - --config=/tidb.toml
   178            - --log-file=/logs/upstream-tidb.log
   179            - --advertise-address=upstream-tidb
   180          depends_on:
   181            - "upstream-tikv0"
   182            - "upstream-tikv1"
   183            - "upstream-tikv2"
   184          restart: on-failure
   185  
   186        downstream-pd:
   187          image: pingcap/pd:nightly
   188          ports:
   189            - "3379:2379"
   190          volumes:
   191            - ./docker/config/pd.toml:/pd.toml:ro
   192            - /data
   193            - ./docker/logs:/logs
   194          command:
   195            - --name=downstream-pd
   196            - --client-urls=http://0.0.0.0:2379
   197            - --peer-urls=http://0.0.0.0:2380
   198            - --advertise-client-urls=http://downstream-pd:2379
   199            - --advertise-peer-urls=http://downstream-pd:2380
   200            - --initial-cluster=downstream-pd=http://downstream-pd:2380
   201            - --data-dir=/data/downstream-pd
   202            - --config=/pd.toml
   203            - --log-file=/logs/downstream-pd.log
   204          restart: on-failure
   205  
   206        downstream-tikv0:
   207          image: pingcap/tikv:nightly
   208          volumes:
   209            - ./docker/config/tikv.toml:/tikv.toml:ro
   210            - /data
   211            - ./docker/logs:/logs
   212          command:
   213            - --addr=0.0.0.0:20160
   214            - --advertise-addr=downstream-tikv0:20160
   215            - --data-dir=/data/downstream-tikv0
   216            - --pd=downstream-pd:2379
   217            - --config=/tikv.toml
   218            - --log-file=/logs/downstream-tikv0.log
   219          depends_on:
   220            - "downstream-pd"
   221          restart: on-failure
   222  
   223        downstream-tikv1:
   224          image: pingcap/tikv:nightly
   225          volumes:
   226            - ./docker/config/tikv.toml:/tikv.toml:ro
   227            - /data
   228            - ./docker/logs:/logs
   229          command:
   230            - --addr=0.0.0.0:20160
   231            - --advertise-addr=downstream-tikv1:20160
   232            - --data-dir=/data/downstream-tikv1
   233            - --pd=downstream-pd:2379
   234            - --config=/tikv.toml
   235            - --log-file=/logs/downstream-tikv1.log
   236          depends_on:
   237            - "downstream-pd"
   238          restart: on-failure
   239  
   240        downstream-tikv2:
   241          image: pingcap/tikv:nightly
   242          volumes:
   243            - ./docker/config/tikv.toml:/tikv.toml:ro
   244            - /data
   245            - ./docker/logs:/logs
   246          command:
   247            - --addr=0.0.0.0:20160
   248            - --advertise-addr=downstream-tikv2:20160
   249            - --data-dir=/data/downstream-tikv2
   250            - --pd=downstream-pd:2379
   251            - --config=/tikv.toml
   252            - --log-file=/logs/downstream-tikv2.log
   253          depends_on:
   254            - "downstream-pd"
   255          restart: on-failure
   256  
   257        downstream-tidb:
   258          image: pingcap/tidb:nightly
   259          ports:
   260            - "5000:4000"
   261            - "20080:10080"
   262          volumes:
   263            - ./docker/config/tidb.toml:/tidb.toml:ro
   264            - ./docker/logs:/logs
   265          command:
   266            - --store=tikv
   267            - --path=downstream-pd:2379
   268            - --config=/tidb.toml
   269            - --log-file=/logs/downstream-tidb.log
   270            - --advertise-address=downstream-tidb
   271          depends_on:
   272            - "downstream-tikv0"
   273            - "downstream-tikv1"
   274            - "downstream-tikv2"
   275          restart: on-failure