docker-compose.yml 6.75 KB
Newer Older
1
2
3
4
version: '3.7'

services:
  user-and-group:
Tomáš Sapák's avatar
Tomáš Sapák committed
5
    image: {{ kypo_crp_docker_services.user_and_group.image + ":" + kypo_crp_docker_services.user_and_group.image_tag }}
6
    container_name: {{ kypo_crp_uag_service_container_name }}
Tomáš Sapák's avatar
Tomáš Sapák committed
7
    restart: {{ kypo_crp_docker_services.user_and_group.restart_policy }}
8
    volumes:
9
10
      - ./configuration/user-and-group-service/kypo-user-and-group.properties:/app/etc/user-and-group.properties
      - ./configuration/user-and-group-service/initial-users.yml:/app/etc/initial-users.yml
Tomáš Sapák's avatar
Tomáš Sapák committed
11
      - {{ kypo_crp_java_cacerts_dest + ":/usr/local/openjdk-11/lib/security/cacerts" }}
12
      - db_data_uag:/var/lib/postgresql/11/main/
13
  sandbox-service:
Tomáš Sapák's avatar
Tomáš Sapák committed
14
    image: {{ kypo_crp_docker_services.sandbox_service.image + ":" + kypo_crp_docker_services.sandbox_service.image_tag }}
15
    container_name: {{ kypo_crp_sandbox_service_container_name }}
Tomáš Sapák's avatar
Tomáš Sapák committed
16
    restart: {{ kypo_crp_docker_services.sandbox_service.restart_policy }}
17
18
    environment:
      SERVICE_PRECONDITION: "uag-service:8084"
19
    volumes:
20
      - ./configuration/sandbox-service/kypo-sandbox-service-config.yml:/app/config.yml:ro
21
      - ./configuration/sandbox-service/supervisord.conf:/etc/supervisord.conf
22
      - ./runtime-data/{{ kypo_crp_git.server }}:/root/.ssh/{{ kypo_crp_git.server }}:ro
23
      - ./runtime-data/{{ kypo_crp_proxy_key_name }}:/root/.ssh/{{ kypo_crp_proxy_key_name }}:ro
24
      - /etc/ssl/certs/ca-certificates.crt:/etc/ssl/certs/ca-certificates.crt
25
26
      - /var/opt/kypo/kypo-ansible-runner-volumes:/var/opt/kypo/kypo-ansible-runner-volumes
      - /var/run/docker.sock:/var/run/docker.sock:ro
27
      - db_data_sandbox_service:/var/lib/postgresql/data/
28
29
    depends_on:
      - user-and-group
30
  training:
Tomáš Sapák's avatar
Tomáš Sapák committed
31
    image: {{ kypo_crp_docker_services.training.image + ":" + kypo_crp_docker_services.training.image_tag }}
32
    container_name: {{ kypo_crp_training_service_container_name }}
Tomáš Sapák's avatar
Tomáš Sapák committed
33
    restart: {{ kypo_crp_docker_services.training.restart_policy }}
34
35
    environment:
      SERVICE_PRECONDITION: "uag-service:8084"
36
    volumes:
37
      - ./configuration/training-service/kypo-training.properties:/app/etc/training.properties
Tomáš Sapák's avatar
Tomáš Sapák committed
38
      - {{ kypo_crp_java_cacerts_dest + ":/usr/local/openjdk-11/lib/security/cacerts" }}
39
      - db_data_training:/var/lib/postgresql/11/main/
40
    depends_on:
41
      - sandbox-service
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
  adaptive-training:
    image: {{ kypo_crp_docker_services.adaptive_training.image + ":" + kypo_crp_docker_services.adaptive_training.image_tag }}
    container_name: {{ kypo_crp_adaptive_training_service_container_name }}
    restart: {{ kypo_crp_docker_services.adaptive_training.restart_policy }}
    environment:
      SERVICE_PRECONDITION: "uag-service:8084"
    volumes:
      - ./configuration/adaptive-training-service/kypo-adaptive-training.properties:/app/etc/kypo-adaptive-training.properties
      - {{ kypo_crp_java_cacerts_dest + ":/usr/local/openjdk-11/lib/security/cacerts" }}
      - db_data_adaptive_training:/var/lib/postgresql/11/main/
    depends_on:
      - sandbox-service
  smart-assistant:
    image: {{ kypo_crp_docker_services.smart_assistant.image + ":" + kypo_crp_docker_services.smart_assistant.image_tag }}
    container_name: {{ kypo_crp_smart_assistant_service_container_name }}
    restart: {{ kypo_crp_docker_services.smart_assistant.restart_policy }}
    volumes:
      - ./configuration/smart-assistant-service/kypo-smart-assistant.properties:/app/etc/kypo-adaptive-smart-assistant.properties
      - {{ kypo_crp_java_cacerts_dest + ":/usr/local/openjdk-11/lib/security/cacerts" }}
      - db_data_smart_assistant:/var/lib/postgresql/11/main/
62
63
64
65
66
67
68
69
  answers-storage:
    image: {{ kypo_crp_docker_services.answers_storage.image + ":" + kypo_crp_docker_services.answers_storage.image_tag }}
    container_name: {{ kypo_crp_answers_storage_service_container_name }}
    restart: {{ kypo_crp_docker_services.answers_storage.restart_policy }}
    volumes:
      - ./configuration/answers-storage-service/kypo-answers-storage.properties:/app/etc/kypo-answers-storage.properties
      - {{ kypo_crp_java_cacerts_dest + ":/usr/local/openjdk-11/lib/security/cacerts" }}
      - db_data_answers_storage:/var/lib/postgresql/11/main/
70
71
72
73
74
75
76
77
  training-feedback:
    image: {{ kypo_crp_docker_services.training_feedback.image + ":" + kypo_crp_docker_services.training_feedback.image_tag }}
    container_name: {{ kypo_crp_training_feedback_service_container_name }}
    restart: {{ kypo_crp_docker_services.training_feedback.restart_policy }}
    volumes:
      - ./configuration/training-feedback-service/kypo-training-feedback.properties:/app/etc/kypo-training-feedback.properties
      - {{ kypo_crp_java_cacerts_dest + ":/usr/local/openjdk-11/lib/security/cacerts" }}
      - db_data_training_feedback:/var/lib/postgresql/11/main/
78
  elasticsearch-service:
Tomáš Sapák's avatar
Tomáš Sapák committed
79
    image: {{ kypo_crp_docker_services.elasticsearch_service.image + ":" + kypo_crp_docker_services.elasticsearch_service.image_tag }}
80
    container_name: {{ kypo_crp_elasticsearch_service_container_name }}
Tomáš Sapák's avatar
Tomáš Sapák committed
81
    restart: {{ kypo_crp_docker_services.elasticsearch_service.restart_policy }}
82
83
    environment:
      SERVICE_PRECONDITION: "uag-service:8084"
84
    volumes:
85
      - ./configuration/elasticsearch-service/kypo-elasticsearch-service.properties:/app/etc/kypo-elasticsearch-service.properties
Tomáš Sapák's avatar
Tomáš Sapák committed
86
      - {{ kypo_crp_java_cacerts_dest + ":/usr/local/openjdk-11/lib/security/cacerts" }}
87
  frontend:
Tomáš Sapák's avatar
Tomáš Sapák committed
88
    image: {{ kypo_crp_docker_services.frontend.image + ":" + kypo_crp_docker_services.frontend.image_tag }}
89
    container_name: {{ kypo_crp_angular_frontend_container_name }}
Tomáš Sapák's avatar
Tomáš Sapák committed
90
    restart: {{ kypo_crp_docker_services.frontend.restart_policy }}
91
    volumes:
92
      - ./configuration/angular-frontend/kypo-config.json:/app/assets/kypo-config.json
93
  nginx:
Tomáš Sapák's avatar
Tomáš Sapák committed
94
    image: {{ kypo_crp_docker_services.nginx.image + ":" + kypo_crp_docker_services.nginx.image_tag }}
95
    container_name: kypo-nginx
Tomáš Sapák's avatar
Tomáš Sapák committed
96
    restart: {{ kypo_crp_docker_services.nginx.restart_policy }}
97
    volumes:
98
      - ./configuration/nginx-reverse-proxy/nginx.conf:/etc/nginx/conf.d/default.conf
99
100
      - ./runtime-data/{{ kypo_crp_cert_name }}:/etc/nginx/{{ kypo_crp_cert_name }}
      - ./runtime-data/{{ kypo_crp_cert_key_name }}:/etc/nginx/{{ kypo_crp_cert_key_name }}
101
    ports:
Tomáš Sapák's avatar
Master    
Tomáš Sapák committed
102
      - 80:80
103
      - 443:443
104
105
    depends_on:
      - user-and-group
106
      - sandbox-service
107
      - training
108
      - adaptive-training
109
      - smart-assistant
110
      - frontend
111
112
113
volumes:
  db_data_uag:
    name: postgre-data-uag
114
  db_data_training:
115
    name: postgre-data-training
116
117
118
119
  db_data_adaptive_training:
    name: postgre-data-adaptive-training
  db_data_smart_assistant:
    name: postgre-data-smart-assistant
120
121
  db_data_answers_storage:
    name: postgre-data-answers-storage
122
123
  db_data_training_feedback:
    name: postgre-data-training-feedback
124
125
  db_data_sandbox_service:
    name: postgre-data-sandbox-service
126

127
networks:
128
129
130
  default:
    external:
      name: '{{ kypo_crp_docker_network_name }}'