github.com/pingcap/tiflow@v0.0.0-20240520035814-5bf52d54e205/deployments/engine/docker-compose/3m3e_with_s3.yaml (about)

     1  version: "2.3"
     2  services:
     3    server-master-0:
     4      image: dataflow:test
     5      container_name: server-master-0
     6      ports:
     7        - "10245:10240"
     8      volumes:
     9        - ./config/master_with_s3.toml:/config.toml
    10        - /tmp/tiflow_engine_test:/log
    11      command:
    12        - "/tiflow"
    13        - "master"
    14        - "--name=server-master-0"
    15        - "--addr=0.0.0.0:10240"
    16        - "--advertise-addr=server-master-0:10240"
    17        - "--config=/config.toml"
    18        - "--log-file=/log/server-master-0.log"
    19      depends_on:
    20        "etcd-standalone":
    21          condition: service_started
    22        "mysql-standalone":
    23          condition: service_healthy
    24        "minio-standalone":
    25          condition: service_healthy
    26      restart: unless-stopped
    27  
    28    server-master-1:
    29      image: dataflow:test
    30      container_name: server-master-1
    31      ports:
    32        - "10246:10240"
    33      volumes:
    34        - ./config/master_with_s3.toml:/config.toml
    35        - /tmp/tiflow_engine_test:/log
    36      command:
    37        - "/tiflow"
    38        - "master"
    39        - "--name=server-master-1"
    40        - "--addr=0.0.0.0:10240"
    41        - "--advertise-addr=server-master-1:10240"
    42        - "--config=/config.toml"
    43        - "--log-file=/log/server-master-1.log"
    44      depends_on:
    45        "etcd-standalone":
    46          condition: service_started
    47        "mysql-standalone":
    48          condition: service_healthy
    49        "minio-standalone":
    50          condition: service_healthy
    51      restart: unless-stopped
    52  
    53    server-master-2:
    54      image: dataflow:test
    55      container_name: server-master-2
    56      ports:
    57        - "10247:10240"
    58      volumes:
    59        - ./config/master_with_s3.toml:/config.toml
    60        - /tmp/tiflow_engine_test:/log
    61      command:
    62        - "/tiflow"
    63        - "master"
    64        - "--name=server-master-2"
    65        - "--addr=0.0.0.0:10240"
    66        - "--advertise-addr=server-master-2:10240"
    67        - "--config=/config.toml"
    68        - "--log-file=/log/server-master-2.log"
    69      depends_on:
    70        "etcd-standalone":
    71          condition: service_started
    72        "mysql-standalone":
    73          condition: service_healthy
    74        "minio-standalone":
    75          condition: service_healthy
    76      restart: unless-stopped
    77  
    78    server-executor-0:
    79      image: dataflow:test
    80      container_name: server-executor-0
    81      ports:
    82        - "11241:10241"
    83      volumes:
    84        - ./config/executor.toml:/config.toml
    85        - /tmp/tiflow_engine_test:/log
    86      command:
    87        - "/tiflow"
    88        - "executor"
    89        - "--name=server-executor-0"
    90        - "--addr=0.0.0.0:10241"
    91        - "--advertise-addr=server-executor-0:10241"
    92        - "--join=server-master-0:10240,server-master-1:10240,server-master-2:10240"
    93        - "--config=/config.toml"
    94        - "--log-file=/log/server-executor-0.log"
    95        - "--labels=\"name=exec-0\""
    96      depends_on:
    97        - "server-master-0"
    98        - "server-master-2"
    99        - "server-master-1"
   100      extra_hosts:
   101        - "host.docker.internal:host-gateway"
   102      restart: unless-stopped
   103  
   104    server-executor-1:
   105      image: dataflow:test
   106      container_name: server-executor-1
   107      ports:
   108        - "11242:10241"
   109      volumes:
   110        - ./config/executor.toml:/config.toml
   111        - /tmp/tiflow_engine_test:/log
   112      command:
   113        - "/tiflow"
   114        - "executor"
   115        - "--name=server-executor-1"
   116        - "--addr=0.0.0.0:10241"
   117        - "--advertise-addr=server-executor-1:10241"
   118        - "--join=server-master-0:10240,server-master-1:10240,server-master-2:10240"
   119        - "--config=/config.toml"
   120        - "--log-file=/log/server-executor-1.log"
   121        - "--labels=\"name=exec-1\""
   122      depends_on:
   123        - "server-master-0"
   124        - "server-master-2"
   125        - "server-master-1"
   126      extra_hosts:
   127        - "host.docker.internal:host-gateway"
   128      restart: unless-stopped
   129  
   130    server-executor-2:
   131      image: dataflow:test
   132      container_name: server-executor-2
   133      ports:
   134        - "11243:10241"
   135      volumes:
   136        - ./config/executor.toml:/config.toml
   137        - /tmp/tiflow_engine_test:/log
   138      command:
   139        - "/tiflow"
   140        - "executor"
   141        - "--name=server-executor-2"
   142        - "--addr=0.0.0.0:10241"
   143        - "--advertise-addr=server-executor-2:10241"
   144        - "--join=server-master-0:10240,server-master-1:10240,server-master-2:10240"
   145        - "--config=/config.toml"
   146        - "--log-file=/log/server-executor-2.log"
   147        - "--labels=\"name=exec-2\""
   148      depends_on:
   149        - "server-master-0"
   150        - "server-master-2"
   151        - "server-master-1"
   152      extra_hosts:
   153        - "host.docker.internal:host-gateway"
   154      restart: unless-stopped
   155  
   156    etcd-standalone:
   157      image: quay.io/coreos/etcd
   158      container_name: etcd-standalone
   159      command:
   160        - "etcd"
   161        - "--listen-client-urls=http://0.0.0.0:2379"
   162        - "--advertise-client-urls=http://etcd-standalone:2379"
   163      ports:
   164        - "12479:2379"
   165  
   166    mysql-standalone:
   167      image: mysql:8.0
   168      container_name: mysql-standalone
   169      command: --default-authentication-plugin=mysql_native_password
   170      environment:
   171        MYSQL_ALLOW_EMPTY_PASSWORD: "yes"
   172      volumes:
   173        - './config/mysql_meta.cnf:/etc/my.cnf'
   174      ports:
   175        - "3336:3306"
   176      healthcheck:
   177        test: mysql -h127.0.0.1 -P3306 -e "show databases"
   178        interval: 10s
   179        timeout: 600s
   180        retries: 60
   181      restart: on-failure
   182  
   183    minio-standalone:
   184      image: minio/minio
   185      container_name: minio-standalone
   186      command: server --console-address ":9001" /data
   187      ports:
   188        - "9000:9000"
   189        - "9001:9001"
   190      environment:
   191        MINIO_ROOT_USER: engine
   192        MINIO_ROOT_PASSWORD: engineSecret
   193      healthcheck:
   194        test: ["CMD", "curl", "-f", "http://localhost:9000/minio/health/live"]
   195        interval: 10s
   196        timeout: 60s
   197        retries: 6
   198  
   199    minio-createbuckets:
   200      image: minio/mc
   201      container_name: minio-createbuckets
   202      depends_on:
   203        - minio-standalone
   204      entrypoint: >
   205        /bin/sh -c "
   206        /usr/bin/mc alias set myminio http://minio-standalone:9000 engine engineSecret || exit 1;
   207        /usr/bin/mc mb myminio/engine-it || exit 1;
   208        /usr/bin/mc version enable myminio/engine-ut;
   209        exit 0;
   210        "