d93d4bb7add20a452eaa45954b888df92537dc72
[policy/xacml-pdp.git] / tutorials / tutorial-enforcement / 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:latest
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    pap:
41       # Released Honlulu image
42       image: nexus3.onap.org:10001/onap/policy-pap:2.4.2
43       container_name: policy-pap
44       depends_on:
45        - mariadb
46        - message-router
47       hostname: policy-pap
48       ports:
49        - "6868:6969"
50       expose:
51        - 6868
52    api:
53       # Released Honolulu image
54       image: nexus3.onap.org:10001/onap/policy-api:2.4.2
55       container_name: policy-api
56       depends_on:
57        - mariadb
58       hostname: policy-api
59       ports:
60        - "6767:6969"
61       expose:
62        - 6767
63    xacml-pdp:
64       # Released Honolulu image
65       image: nexus3.onap.org:10001/onap/policy-xacml-pdp:2.4.2
66       container_name: policy-xacml-pdp
67       depends_on:
68        - mariadb
69        - message-router
70        - pap
71       hostname: policy-xacml-pdp
72       ports:
73        - "6969:6969"
74       expose:
75        - 6969
76    start_dependencies:
77       image: dadarek/wait-for-dependencies
78       environment:
79         TIMEOUT_LENGTH: 60
80       container_name: policy-wait
81       depends_on:
82         - mariadb
83         - message-router
84       hostname: policy-wait
85       command:
86         mariadb:3306
87         message-router:3904
88    start_all:
89       image: dadarek/wait-for-dependencies
90       environment:
91         TIMEOUT_LENGTH: 60
92       container_name: policy-wait-all
93       depends_on:
94         - mariadb
95         - message-router
96         - api
97         - pap
98         - xacml-pdp
99       hostname: policy-wait-all
100       command:
101         mariadb:3306
102         message-router:3904
103         api:6969
104         pap:6969
105         xacml-pdp:6969