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