blob: 06c20d26fb2da3f55c7c9ec3a0b61e5bbfe5677a [file] [log] [blame]
Zack Williamsa2763112017-01-03 11:38:38 -07001version: '2'
2
3# XOS bootstrap docker compose
4# generated by platform-install/roles/cord-profile
5
6networks:
7{% for network in xos_docker_networks %}
8 {{ network }}:
9 external: true
10{% endfor %}
11
12services:
13 xos_db:
Andy Baviera6cffe12017-03-15 17:33:42 -040014 image: {{ deploy_docker_registry }}xosproject/xos-postgres:{{ deploy_docker_tag }}
Zack Williamsa2763112017-01-03 11:38:38 -070015 networks:
16{% for network in xos_docker_networks %}
17 - {{ network }}
18{% endfor %}
19 expose:
20 - "5432"
21
22{% if use_redis %}
23 xos_redis:
Andy Baviera6cffe12017-03-15 17:33:42 -040024 image: {{ deploy_docker_registry }}redis:{{ deploy_docker_tag }}
Zack Williamsa2763112017-01-03 11:38:38 -070025 networks:
26{% for network in xos_docker_networks %}
27 - {{ network }}
28{% endfor %}
29 logging:
30 driver: "json-file"
31 options:
32 max-size: "1000k"
33 max-file: "5"
34{% endif %}
35
36 xos_bootstrap_ui:
Andy Baviera6cffe12017-03-15 17:33:42 -040037 image: {{ deploy_docker_registry }}xosproject/xos:{{ deploy_docker_tag }}
Zack Williamsa2763112017-01-03 11:38:38 -070038 command: python /opt/xos/manage.py runserver 0.0.0.0:{{ xos_bootstrap_ui_port }} --insecure --makemigrations
39 networks:
40{% for network in xos_docker_networks %}
41 - {{ network }}
42{% endfor %}
43 labels:
44 org.xosproject.kind: userinterface
45 org.xosproject.target: bootstrap
46 links:
47 - xos_db
48{% if use_redis %}
49 - xos_redis:redis
50{% endif %}
51 volumes:
52 - .:/opt/cord_profile:ro
53 - ./xos_common_config:/opt/xos/xos_configuration/xos_common_config:ro
54{% for service in xos_services %}
55 - {{ cord_dir }}/{{ service.path }}:/opt/xos_services/{{ service.path | basename }}:ro
56{% endfor %}
57{% for library in xos_libraries %}
58 - {{ cord_dir }}/orchestration/xos_libraries/{{ library }}:/opt/xos_libraries/{{ library }}:ro
59{% endfor %}
60{% for volume in xos_docker_volumes %}
61 - {{ volume.host }}:{{ volume.container }}{{ ":rw" if (volume.read_only is defined and not volume.read_only ) else ":ro" }}
62{% endfor %}
63 ports:
64 - "{{ xos_bootstrap_ui_port }}:{{ xos_bootstrap_ui_port }}"
65 logging:
66 driver: "json-file"
67 options:
68 max-size: "1000k"
69 max-file: "5"
Andy Bavier432b80b2017-03-26 14:21:51 -040070 depends_on:
71 - xos_db
72{% if use_redis %}
73 - xos_redis
74{% endif %}
Zack Williamsa2763112017-01-03 11:38:38 -070075
76 xos_synchronizer_onboarding:
Andy Baviera6cffe12017-03-15 17:33:42 -040077 image: {{ deploy_docker_registry }}xosproject/xos:{{ deploy_docker_tag }}
Zack Williamsa2763112017-01-03 11:38:38 -070078 command: bash -c "cd /opt/xos/synchronizers/onboarding; ./run.sh"
79 networks:
80{% for network in xos_docker_networks %}
81 - {{ network }}
82{% endfor %}
83 labels:
84 org.xosproject.kind: synchronizer
85 org.xosproject.target: onboarding
86 links:
87 - xos_db
88 volumes:
89 - /var/run/docker.sock:/var/run/docker.sock
90 - ./key_import:/opt/xos/key_import:ro
91 - ./onboarding-docker-compose:/opt/xos/synchronizers/onboarding/docker-compose
92{% for service in xos_services %}
93 - {{ cord_dir }}/{{ service.path }}:/opt/xos_services/{{ service.path | basename }}:ro
94{% endfor %}
95{% for library in xos_libraries %}
96 - {{ cord_dir }}/orchestration/xos_libraries/{{ library }}:/opt/xos_libraries/{{ library }}:ro
97{% endfor %}
98 logging:
99 driver: "json-file"
100 options:
101 max-size: "1000k"
102 max-file: "5"
Andy Bavier432b80b2017-03-26 14:21:51 -0400103 depends_on:
104 - xos_db