docker-compose.yml 1.9 KB
Newer Older
H
hzcheng 已提交
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78
version: '3.2'

services:
    mnode:
        # Build properties
        build:
            context: .
            dockerfile: Dockerfile.mnode
        image: mnode_img
        # Deploy properties
        deploy:
            mode: replicated
            replicas: 1
            restart_policy:
                condition: on-failure
                delay: 5s
                max_attempts: 3
                window: 120s
        ports:
            - "6100:6100"
            - "6120:6120"
            - "6220:6220"
            - "6260:6260"
            - "6280:6280"
        volumes:
            - type: volume
              source: taos_data
              target: /var/lib/taos/
            - type: volume
              source: taos_log
              target: /var/log/taos/
              # And also configuration files.
        network_mode: bridge

    dnode:
        # Build properties
        build:
            context: .
            dockerfile: Dockerfile.dnode
        image: dnode_img
        # Deploy properties
        deploy:
            mode: replicated
            replicas: 1
            restart_policy:
                condition: on-failure
                delay: 5s
                max_attempts: 3
                window: 120s
        ports:
            - "6140:6140"
            - "6160:6160"
            - "6180:6180"
            - "6200:6200"
            - "6240:6240"
        volumes:
            - type: volume
              source: taos_data
              target: /var/lib/taos/
            - type: volume
              source: taos_log
              target: /var/log/taos/
              # And also configuration files.
        network_mode: bridge

    taos:
        # Build properties
        build:
            context: .
            dockerfile: Dockerfile.taos
        image: taos_img
        # Deploy properties

volumes:
    taos_data:
    taos_log:

# To build the images: docker-compose build