d2902ff51a030f30b1d6a4eeba427dc29065c7ee
[dmaap/datarouter.git] / csit / scripts / dmaap-datarouter / docker-compose / docker-compose.yml
1 #
2 # ============LICENSE_START=======================================================
3 #  Copyright (C) 2019-21 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: onap/dmaap/datarouter-prov:latest
25     container_name: datarouter-prov
26     hostname: dmaap-dr-prov
27     ports:
28     - "443:8443"
29     - "8443:8443"
30     - "8080:8080"
31     volumes:
32     - ./provserver.properties:/opt/app/datartr/etc/provserver.properties
33     - ./logback.xml:/opt/app/datartr/etc/logback.xml
34     - ../dr_certs/dr_prov/truststore.jks:/opt/app/osaaf/local/truststore.jks
35     - ../dr_certs/dr_prov/org.onap.dmaap-dr-prov.p12:/opt/app/osaaf/local/org.onap.dmaap-dr-prov.p12
36     - ../dr_certs/dr_prov/org.onap.dmaap-dr.cred.props:/opt/app/osaaf/local/org.onap.dmaap-dr.cred.props
37     depends_on:
38       mariadb:
39         condition: service_healthy
40     healthcheck:
41       test: ["CMD", "curl", "-f", "http://dmaap-dr-prov:8080/internal/prov"]
42       interval: 10s
43       timeout: 30s
44       retries: 5
45     networks:
46       net:
47         aliases:
48         - dmaap-dr-prov
49
50   datarouter-node:
51     image: onap/dmaap/datarouter-node:latest
52     container_name: datarouter-node
53     hostname: dmaap-dr-node
54     ports:
55     - "9443:8443"
56     - "9090:8080"
57     volumes:
58     - ./node.properties:/opt/app/datartr/etc/node.properties
59     - ../dr_certs/dr_node/truststore.jks:/opt/app/osaaf/local/truststore.jks
60     - ../dr_certs/dr_node/org.onap.dmaap-dr-node.p12:/opt/app/osaaf/local/org.onap.dmaap-dr-node.p12
61     - ../dr_certs/dr_node/org.onap.dmaap-dr.cred.props:/opt/app/osaaf/local/org.onap.dmaap-dr.cred.props
62     depends_on:
63       datarouter-prov:
64         condition: service_healthy
65     networks:
66       net:
67         aliases:
68         - dmaap-dr-node
69
70   datarouter-subscriber:
71     image: onap/dmaap/datarouter-subscriber:latest
72     container_name: subscriber-node
73     hostname: subscriber.com
74     ports:
75     - "7070:7070"
76     volumes:
77     - ./subscriber.properties:/opt/app/subscriber/etc/subscriber.properties
78     networks:
79       net:
80         aliases:
81         - subscriber.com
82
83   datarouter-subscriber2:
84     image: onap/dmaap/datarouter-subscriber:latest
85     container_name: subscriber-node2
86     hostname: subscriber2.com
87     ports:
88     - "7071:7070"
89     volumes:
90     - ./subscriber.properties:/opt/app/subscriber/etc/subscriber.properties
91     networks:
92       net:
93         aliases:
94         - subscriber2.com
95
96   mariadb:
97     image: nexus3.onap.org:10001/library/mariadb:10.2.14
98     container_name: mariadb
99     hostname: datarouter-mariadb
100     ports:
101     - "3306:3306"
102     environment:
103       MYSQL_ROOT_PASSWORD: datarouter
104       MYSQL_DATABASE: datarouter
105       MYSQL_USER: datarouter
106       MYSQL_PASSWORD: datarouter
107     healthcheck:
108       test: ["CMD", "mysqladmin" ,"ping", "-h", "localhost", "-u", "datarouter", "-pdatarouter", "--silent"]
109       interval: 10s
110       timeout: 30s
111       retries: 5
112     networks:
113       net:
114         aliases:
115         - datarouter-mariadb
116
117 networks:
118   net:
119     driver: bridge