adding unit test for Subscription
[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:10003/onap/dmaap/datarouter-prov
27     container_name: datarouter-prov
28     hostname: prov.datarouternew.com
29     ports:
30      - "8443:8443"
31      - "8080:8080"  
32     volumes:
33      - ./prov_data/provserver.properties:/opt/app/datartr/etc/provserver.properties
34      - ./prov_data/addSubscriber.txt:/opt/app/datartr/addSubscriber.txt
35      - ./prov_data/addFeed3.txt:/opt/app/datartr/addFeed3.txt
36     depends_on:
37       mariadb_container:
38         condition: service_healthy
39     healthcheck:
40       test: ["CMD", "curl", "-f", "http://prov.datarouternew.com:8080/internal/prov"]
41       interval: 10s
42       timeout: 10s
43       retries: 5
44     extra_hosts:
45       - "node.datarouternew.com:172.100.0.4"
46     networks:
47       testing_net:
48         ipv4_address: 172.100.0.3
49
50   datarouter-node:
51     image: nexus3.onap.org:10003/onap/dmaap/datarouter-node
52     container_name: datarouter-node
53     hostname: node.datarouternew.com
54     ports:
55      - "9443:8443"
56      - "9090:8080"
57     volumes:
58      - ./node_data/node.properties:/opt/app/datartr/etc/node.properties
59     depends_on:
60       datarouter-prov:
61         condition: service_healthy
62     extra_hosts:
63       - "prov.datarouternew.com:172.100.0.3"
64     networks:
65       testing_net:
66         ipv4_address: 172.100.0.4
67
68   datarouter-subscriber:
69       image: nexus3.onap.org:10003/onap/dmaap/datarouter-subscriber
70       container_name: subscriber-node
71       hostname: subscriber.com
72       ports:
73        - "7070:7070"
74       volumes:
75        - ./subscriber_data/subscriber.properties:/opt/app/subscriber/etc/subscriber.properties
76       networks:
77         testing_net:
78           ipv4_address: 172.100.0.5
79       
80   mariadb_container:
81     image: mariadb:10.2.14
82     container_name: mariadb
83     ports:
84       - "3306:3306"
85 #    volumes:
86 #     - ./database/sql_init_01.sql:/docker-entrypoint-initdb.d/sql_init_01.sql
87     environment:
88       MYSQL_ROOT_PASSWORD: datarouter
89       MYSQL_DATABASE: datarouter
90       MYSQL_USER: datarouter
91       MYSQL_PASSWORD: datarouter
92     healthcheck:
93       test: ["CMD", "mysqladmin" ,"ping", "-h", "localhost", "--silent"]
94       interval: 10s
95       timeout: 30s
96       retries: 5
97
98     networks:
99       testing_net:
100         ipv4_address: 172.100.0.2
101
102 networks:
103   testing_net:
104     driver: bridge
105     ipam:
106       driver: default
107       config:
108         - subnet: 172.100.0.0/16