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