Submit Policy Tutorials
[policy/xacml-pdp.git] / tutorials / tutorial-xacml-application / src / main / docker / docker-compose.yml
1 # ============LICENSE_START=======================================================
2 #  Copyright (C) 2020 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    api:
41       # Guilin released images
42       image: nexus3.onap.org:10001/onap/policy-api:2.3.3
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       # Guilin released images
53       image: nexus3.onap.org:10001/onap/policy-pap:2.3.3
54       container_name: policy-pap
55       depends_on:
56        - mariadb
57        - message-router
58        - api
59       hostname: policy-pap
60       ports:
61        - "6868:6969"
62       expose:
63        - 6868
64    xacml-pdp:
65       image: onap/policy-xacml-tutorial
66       container_name: policy-xacml-pdp
67       depends_on:
68        - mariadb
69        - message-router
70        - api
71        - pap
72       hostname: policy-xacml-pdp
73       ports:
74        - "6969:6969"
75       expose:
76        - 6969
77    start_dependencies:
78       image: dadarek/wait-for-dependencies
79       environment:
80         TIMEOUT_LENGTH: 60
81       container_name: policy-wait
82       depends_on:
83         - mariadb
84         - message-router
85       hostname: policy-wait
86       command:
87         mariadb:3306
88         message-router:3904
89    start_all:
90       image: dadarek/wait-for-dependencies
91       environment:
92         TIMEOUT_LENGTH: 60
93       container_name: policy-wait-all
94       depends_on:
95         - mariadb
96         - message-router
97         - api
98         - pap
99         - xacml-pdp
100       hostname: policy-wait-all
101       command:
102         mariadb:3306
103         message-router:3904
104         api:6969
105         pap:6969
106         xacml-pdp:6969