Merge "Update Docker Tag related configurations in XACML Tutorial code"
[policy/xacml-pdp.git] / tutorials / tutorial-xacml-application / src / main / docker / docker-compose.yml
1 # ============LICENSE_START=======================================================
2 #  Copyright (C) 2020-2021 AT&T Intellectual Property. All rights reserved.
3 # ================================================================================
4 # Licensed under the Apache License, Version 2.0 (the "License");
5 # you may not use this file except in compliance with the License.
6 # You may obtain a copy of the License at
7 #
8 #      http://www.apache.org/licenses/LICENSE-2.0
9 #
10 # Unless required by applicable law or agreed to in writing, software
11 # distributed under the License is distributed on an "AS IS" BASIS,
12 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 # See the License for the specific language governing permissions and
14 # limitations under the License.
15 #
16 # SPDX-License-Identifier: Apache-2.0
17 # ============LICENSE_END=========================================================
18 version: '2'
19 services:
20    mariadb:
21       image: mariadb:10.2.14
22       container_name: mariadb
23       hostname: mariadb
24       command: ['--lower-case-table-names=1', '--wait_timeout=28800']
25       env_file: config/db/db.conf
26       volumes:
27          - ./config/db:/docker-entrypoint-initdb.d
28       expose:
29        - 3306
30    message-router:
31       image: nexus3.onap.org:10001/onap/policy-models-simulator:2.7.0-SNAPSHOT
32       container_name: dmaap-simulator
33       hostname: dmaap-simulator
34       volumes:
35        - ./config/sim:/opt/app/policy/simulators/etc/mounted:ro
36       ports:
37        - "3904:3904"
38       expose:
39        - 3904
40    api:
41       image: nexus3.onap.org:10001/onap/policy-api:2.7.0-SNAPSHOT
42       container_name: policy-api
43       depends_on:
44        - mariadb
45       hostname: policy-api
46       ports:
47        - "6767:6969"
48       expose:
49        - 6767
50    pap:
51       image: nexus3.onap.org:10001/onap/policy-pap:2.7.0-SNAPSHOT
52       container_name: policy-pap
53       depends_on:
54        - mariadb
55        - message-router
56        - api
57       hostname: policy-pap
58       ports:
59        - "6868:6969"
60       expose:
61        - 6868
62    xacml-pdp:
63       image: onap/policy-xacml-tutorial:2.7.0-SNAPSHOT
64       container_name: policy-xacml-pdp
65       depends_on:
66        - mariadb
67        - message-router
68        - api
69        - pap
70       hostname: policy-xacml-pdp
71       ports:
72        - "6969:6969"
73       expose:
74        - 6969
75    start_dependencies:
76       image: dadarek/wait-for-dependencies
77       environment:
78         TIMEOUT_LENGTH: 60
79       container_name: policy-wait
80       depends_on:
81         - mariadb
82         - message-router
83       hostname: policy-wait
84       command:
85         mariadb:3306
86         message-router:3904
87    start_all:
88       image: dadarek/wait-for-dependencies
89       environment:
90         TIMEOUT_LENGTH: 60
91       container_name: policy-wait-all
92       depends_on:
93         - mariadb
94         - message-router
95         - api
96         - pap
97         - xacml-pdp
98       hostname: policy-wait-all
99       command:
100         mariadb:3306
101         message-router:3904
102         api:6969
103         pap:6969
104         xacml-pdp:6969