ed8a7c04a775c1982f336663c07bbcf26f466c3f
[integration/csit.git] / plans / dmaap-datarouter / ssl-dr-suite / docker-compose / docker-compose.yml
1 #
2 # ============LICENSE_START=======================================================
3 #  Copyright (C) 2019 Nordix Foundation.
4 # ================================================================================
5 # Licensed under the Apache License, Version 2.0 (the "License");
6 # you may not use this file except in compliance with the License.
7 # You may obtain a copy of the License at
8 #
9 #      http://www.apache.org/licenses/LICENSE-2.0
10 #
11 # Unless required by applicable law or agreed to in writing, software
12 # distributed under the License is distributed on an "AS IS" BASIS,
13 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 # See the License for the specific language governing permissions and
15 # limitations under the License.
16 #
17 # SPDX-License-Identifier: Apache-2.0
18 # ============LICENSE_END=========================================================
19 #
20 #
21 version: '2.1'
22 services:
23   datarouter-prov:
24     image: nexus3.onap.org:10001/onap/dmaap/datarouter-prov
25     container_name: datarouter-prov
26     hostname: dmaap-dr-prov
27     ports:
28     - "443:8443"
29     - "8443:8443"
30     - "8080:8080"
31     volumes:
32     - ./prov_data/provserver.properties:/opt/app/datartr/etc/provserver.properties
33     - ./prov_data/addSubscriber.txt:/opt/app/datartr/addSubscriber.txt
34     - ./prov_data/addFeed3.txt:/opt/app/datartr/addFeed3.txt
35     depends_on:
36       mariadb_container:
37         condition: service_healthy
38     healthcheck:
39       test: ["CMD", "curl", "-f", "http://dmaap-dr-prov:8080/internal/prov"]
40       interval: 10s
41       timeout: 30s
42       retries: 5
43     networks:
44       testing_net:
45         aliases:
46         - dmaap-dr-prov
47
48   datarouter-node:
49     image: nexus3.onap.org:10001/onap/dmaap/datarouter-node
50     container_name: datarouter-node
51     hostname: dmaap-dr-node
52     ports:
53     - "9443:8443"
54     - "9090:8080"
55     volumes:
56     - ./node_data/node.properties:/opt/app/datartr/etc/node.properties
57     depends_on:
58       datarouter-prov:
59         condition: service_healthy
60     networks:
61       testing_net:
62         aliases:
63         - dmaap-dr-node
64
65   datarouter-subscriber:
66     image: nexus3.onap.org:10001/onap/dmaap/datarouter-subscriber
67     container_name: subscriber-node
68     hostname: subscriber.com
69     ports:
70     - "7070:7070"
71     volumes:
72     - ./subscriber_data/subscriber.properties:/opt/app/subscriber/etc/subscriber.properties
73     networks:
74       testing_net:
75         aliases:
76         - subscriber.com
77
78   datarouter-subscriber2:
79     image: nexus3.onap.org:10001/onap/dmaap/datarouter-subscriber
80     container_name: subscriber-node2
81     hostname: subscriber2.com
82     ports:
83     - "7071:7070"
84     volumes:
85     - ./subscriber_data/subscriber.properties:/opt/app/subscriber/etc/subscriber.properties
86     networks:
87       testing_net:
88         aliases:
89         - subscriber2.com
90
91   mariadb_container:
92     image: mariadb:10.2.14
93     container_name: mariadb
94     hostname: datarouter-mariadb
95     ports:
96     - "3306:3306"
97     environment:
98       MYSQL_ROOT_PASSWORD: datarouter
99       MYSQL_DATABASE: datarouter
100       MYSQL_USER: datarouter
101       MYSQL_PASSWORD: datarouter
102     healthcheck:
103       test: ["CMD", "mysqladmin" ,"ping", "-h", "localhost", "-u", "datarouter", "-pdatarouter", "--silent"]
104       interval: 10s
105       timeout: 30s
106       retries: 5
107     networks:
108       testing_net:
109         aliases:
110         - datarouter-mariadb
111
112 networks:
113   testing_net:
114     driver: bridge