Zack Williams | a276311 | 2017-01-03 11:38:38 -0700 | [diff] [blame] | 1 | version: '2' |
| 2 | |
| 3 | # XOS bootstrap docker compose |
| 4 | # generated by platform-install/roles/cord-profile |
| 5 | |
| 6 | networks: |
| 7 | {% for network in xos_docker_networks %} |
| 8 | {{ network }}: |
| 9 | external: true |
| 10 | {% endfor %} |
| 11 | |
| 12 | services: |
| 13 | xos_db: |
Andy Bavier | a6cffe1 | 2017-03-15 17:33:42 -0400 | [diff] [blame] | 14 | image: {{ deploy_docker_registry }}xosproject/xos-postgres:{{ deploy_docker_tag }} |
Zack Williams | a276311 | 2017-01-03 11:38:38 -0700 | [diff] [blame] | 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: |
Andy Bavier | a6cffe1 | 2017-03-15 17:33:42 -0400 | [diff] [blame] | 24 | image: {{ deploy_docker_registry }}redis:{{ deploy_docker_tag }} |
Zack Williams | a276311 | 2017-01-03 11:38:38 -0700 | [diff] [blame] | 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: |
Andy Bavier | a6cffe1 | 2017-03-15 17:33:42 -0400 | [diff] [blame] | 37 | image: {{ deploy_docker_registry }}xosproject/xos:{{ deploy_docker_tag }} |
Zack Williams | a276311 | 2017-01-03 11:38:38 -0700 | [diff] [blame] | 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" |
Andy Bavier | 432b80b | 2017-03-26 14:21:51 -0400 | [diff] [blame] | 70 | depends_on: |
| 71 | - xos_db |
| 72 | {% if use_redis %} |
| 73 | - xos_redis |
| 74 | {% endif %} |
Zack Williams | a276311 | 2017-01-03 11:38:38 -0700 | [diff] [blame] | 75 | |
| 76 | xos_synchronizer_onboarding: |
Andy Bavier | a6cffe1 | 2017-03-15 17:33:42 -0400 | [diff] [blame] | 77 | image: {{ deploy_docker_registry }}xosproject/xos:{{ deploy_docker_tag }} |
Zack Williams | a276311 | 2017-01-03 11:38:38 -0700 | [diff] [blame] | 78 | 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 Bavier | 432b80b | 2017-03-26 14:21:51 -0400 | [diff] [blame] | 103 | depends_on: |
| 104 | - xos_db |