File: docker-compose.yml.tpl

package info (click to toggle)
tiup 1.16.3-1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 6,384 kB
  • sloc: sh: 1,988; makefile: 138; sql: 16
file content (59 lines) | stat: -rw-r--r-- 1,186 bytes parent folder | download
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
x-node: &default-node
  build: ./node
  env_file: ./secret/node.env
  privileged: true
  networks:
    - tiops
  ports:
    - ${TIOPS_PORT:-22}

services:
  control:
    container_name: tiup-cluster-control
    hostname: control
    build: control
    env_file: ./secret/control.env
    privileged: true
    ports:
      - "8080"
    networks:
      tiops:
        ipv4_address: {{ipprefix}}.100
{% for id in range(1, nodes+1) %}
  n{{id}}:
    <<: *default-node
    container_name: tiup-cluster-n{{id}}
    hostname: n{{id}}
    networks:
      tiops:
        ipv4_address: {{ipprefix}}.{{id+100}}
{% endfor %}
{% if ssh_proxy %}
  bastion:
    <<: *default-node
    container_name: tiup-cluster-bastion
    hostname: bastion
    networks:
      tiops:
        ipv4_address: {{ipprefix}}.250
      tiproxy:
        ipv4_address: {{proxy_prefix}}.250

{% for id in range(1, nodes+1) %}
  p{{id}}:
    <<: *default-node
    container_name: tiup-cluster-p{{id}}
    hostname: p{{id}}
    networks:
      tiproxy:
        ipv4_address: {{proxy_prefix}}.{{id+100}}
{% endfor %}
{% endif %}

networks:
  tiops:
    external: true
{% if ssh_proxy %}
  tiproxy:
    external: true
{% endif %}