feat(ansible): Add volume mappings for docker containers
[csit.git] / fdio.infra.ansible / roles / docker_images / templates / docker-compose-tg.yaml.j2
1 version: "3"
2 services:
3   tg-0:
4     build:
5       context: "base/"
6       dockerfile: "Dockerfile"
7     command: ["/usr/sbin/sshd","-D", "-p", "6001"]
8     expose:
9       - "6001"
10     hostname: "{{ ansible_hostname }}"
11     network_mode: "host"
12     privileged: true
13     restart: "always"
14     shm_size: "4G"
15     volumes:
16 {% for volume in docker_volumes %}
17       - type: "bind"
18         source: "{{ volume.source }}"
19         target: "{{ volume.target }}"
20 {% endfor %}
21   tg-1:
22     build:
23       context: "base/"
24       dockerfile: "Dockerfile"
25     command: ["/usr/sbin/sshd","-D", "-p", "6002"]
26     expose:
27       - "6002"
28     hostname: "{{ ansible_hostname }}"
29     network_mode: "host"
30     privileged: true
31     restart: "always"
32     shm_size: "4G"
33     volumes:
34 {% for volume in docker_volumes %}
35       - type: "bind"
36         source: "{{ volume.source }}"
37         target: "{{ volume.target }}"
38 {% endfor %}