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