f0b153f91e16d7265a53227ff4891802f85ab22c
[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 #  Modifications Copyright (C) 2022 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 version: '2'
20 services:
21    mariadb:
22       image: ${CONTAINER_LOCATION}mariadb:${POLICY_MARIADB_VER}
23       container_name: mariadb
24       hostname: mariadb
25       command: ['--lower-case-table-names=1', '--wait_timeout=28800']
26       env_file: config/db/db.conf
27       volumes:
28          - ./config/db:/docker-entrypoint-initdb.d
29       expose:
30        - 3306
31    message-router:
32       image: ${CONTAINER_LOCATION}onap/policy-models-simulator:${POLICY_MODELS_VERSION}
33       container_name: dmaap-simulator
34       hostname: dmaap-simulator
35       volumes:
36        - ./config/sim:/opt/app/policy/simulators/etc/mounted:ro
37       ports:
38        - "3904:3904"
39       expose:
40        - 3904
41    api:
42       image: ${CONTAINER_LOCATION}onap/policy-api:${POLICY_API_VERSION}
43       container_name: policy-api
44       depends_on:
45        - mariadb
46       hostname: policy-api
47       ports:
48        - "6767:6969"
49       expose:
50        - 6767
51    pap:
52       image: ${CONTAINER_LOCATION}onap/policy-pap:${POLICY_PAP_VERSION}
53       container_name: policy-pap
54       depends_on:
55        - mariadb
56        - message-router
57        - api
58       hostname: policy-pap
59       ports:
60        - "6868:6969"
61       expose:
62        - 6868
63    xacml-pdp:
64       image: onap/policy-xacml-tutorial:${POLICY_XACML_TUTORIAL_VERSION}
65       container_name: policy-xacml-pdp
66       depends_on:
67        - mariadb
68        - message-router
69        - api
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