blob: bf79d65455762d4bdf401c0e91185d4771b6ad24 [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:
14 image: xosproject/xos-postgres
15 networks:
16{% for network in xos_docker_networks %}
17 - {{ network }}
18{% endfor %}
19 expose:
20 - "5432"
21
22{% if use_redis %}
23 xos_redis:
24 image: redis
25 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:
37 image: xosproject/xos
38 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"
70
71 xos_synchronizer_onboarding:
72 image: xosproject/xos
73 command: bash -c "cd /opt/xos/synchronizers/onboarding; ./run.sh"
74 networks:
75{% for network in xos_docker_networks %}
76 - {{ network }}
77{% endfor %}
78 labels:
79 org.xosproject.kind: synchronizer
80 org.xosproject.target: onboarding
81 links:
82 - xos_db
83 volumes:
84 - /var/run/docker.sock:/var/run/docker.sock
85 - ./key_import:/opt/xos/key_import:ro
86 - ./onboarding-docker-compose:/opt/xos/synchronizers/onboarding/docker-compose
87{% for service in xos_services %}
88 - {{ cord_dir }}/{{ service.path }}:/opt/xos_services/{{ service.path | basename }}:ro
89{% endfor %}
90{% for library in xos_libraries %}
91 - {{ cord_dir }}/orchestration/xos_libraries/{{ library }}:/opt/xos_libraries/{{ library }}:ro
92{% endfor %}
93 logging:
94 driver: "json-file"
95 options:
96 max-size: "1000k"
97 max-file: "5"
98