[DMAAP-BC] Consolidate bus controller repos
[dmaap/buscontroller.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: nexus3.onap.org:10001/onap/dmaap/datarouter-prov:2.1.8
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     - ../dr_certs/dr_prov/truststore.jks:/opt/app/osaaf/local/truststore.jks
34     - ../dr_certs/dr_prov/org.onap.dmaap-dr-prov.p12:/opt/app/osaaf/local/org.onap.dmaap-dr-prov.p12
35     - ../dr_certs/dr_prov/org.onap.dmaap-dr.cred.props:/opt/app/osaaf/local/org.onap.dmaap-dr.cred.props
36     depends_on:
37       mariadb:
38         condition: service_healthy
39     healthcheck:
40       test: ["CMD", "curl", "-f", "http://dmaap-dr-prov:8080/internal/prov"]
41       interval: 10s
42       timeout: 30s
43       retries: 5
44     networks:
45       net:
46         aliases:
47         - dmaap-dr-prov
48
49   datarouter-node:
50     image: nexus3.onap.org:10001/onap/dmaap/datarouter-node:2.1.8
51     container_name: datarouter-node
52     hostname: dmaap-dr-node
53     ports:
54     - "9443:8443"
55     - "9090:8080"
56     volumes:
57     - ./node.properties:/opt/app/datartr/etc/node.properties
58     - ../dr_certs/dr_node/truststore.jks:/opt/app/osaaf/local/truststore.jks
59     - ../dr_certs/dr_node/org.onap.dmaap-dr-node.p12:/opt/app/osaaf/local/org.onap.dmaap-dr-node.p12
60     - ../dr_certs/dr_node/org.onap.dmaap-dr.cred.props:/opt/app/osaaf/local/org.onap.dmaap-dr.cred.props
61     depends_on:
62       datarouter-prov:
63         condition: service_healthy
64     networks:
65       net:
66         aliases:
67         - dmaap-dr-node
68
69   mariadb:
70     image: nexus3.onap.org:10001/library/mariadb:10.2.14
71     container_name: mariadb
72     hostname: datarouter-mariadb
73     ports:
74     - "3306:3306"
75     environment:
76       MYSQL_ROOT_PASSWORD: datarouter
77       MYSQL_DATABASE: datarouter
78       MYSQL_USER: datarouter
79       MYSQL_PASSWORD: datarouter
80     healthcheck:
81       test: ["CMD", "mysqladmin" ,"ping", "-h", "localhost", "-u", "datarouter", "-pdatarouter", "--silent"]
82       interval: 10s
83       timeout: 30s
84       retries: 5
85     networks:
86       net:
87         aliases:
88         - datarouter-mariadb
89
90 networks:
91   net:
92     driver: bridge