blob: b4b199f7adee5a6c2eae42e19c2309eb54d6ed72 [file] [log] [blame]
adheli.tavaresd802fd92024-08-15 12:39:19 +01001#
2# ===========LICENSE_START====================================================
3# Copyright (C) 2023-2024 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# ============LICENSE_END=====================================================
17#
18
19include:
20 - compose.common.yml
21 - compose.postgres.yml
22
23services:
24 api:
25 image: ${CONTAINER_LOCATION}onap/policy-api:${POLICY_API_VERSION}
26 container_name: policy-api
27 hostname: policy-api
28 depends_on:
29 - policy-db-migrator
30 ports:
31 - ${API_PORT}:6969
32 volumes:
33 - ./config/api/apiParameters.yaml:/opt/app/policy/api/etc/apiParameters.yaml:ro
34 - ./config/api/logback.xml:/opt/app/policy/api/etc/logback.xml:ro
35 - ./wait_for_port.sh:/opt/app/policy/api/bin/wait_for_port.sh:ro
36 entrypoint: ./wait_for_port.sh
37 command: [
38 '-c', './policy-api.sh',
39 'policy-db-migrator', '6824'
40 ]
41
42 pap:
43 image: ${CONTAINER_LOCATION}onap/policy-pap:${POLICY_PAP_VERSION}
44 container_name: policy-pap
45 hostname: policy-pap
46 depends_on:
47 - api
48 - kafka
49 ports:
50 - ${PAP_PORT}:6969
51 volumes:
52 - ./config/pap/papParameters.yaml:/opt/app/policy/pap/etc/papParameters.yaml:ro
53 - ./config/apex-pdp/groups.json:/opt/app/policy/pap/etc/mounted/groups.json:ro
54 - ./config/pap/logback.xml:/opt/app/policy/pap/etc/logback.xml:ro
55 - ./wait_for_port.sh:/opt/app/policy/pap/bin/wait_for_port.sh:ro
56 entrypoint: ./wait_for_port.sh
57 command: [
58 '-c', './policy-pap.sh',
59 'api', '6969',
60 'kafka', '9092'
61 ]
62
63 apexpdp:
64 image: ${CONTAINER_LOCATION}onap/policy-apex-pdp:${POLICY_APEX_PDP_VERSION}
65 hostname: policy-apex-pdp
66 depends_on:
67 - simulator
68 - kafka
69 - pap
70 expose:
71 - 6969
72 - 23324
73 deploy:
74 mode: replicated
75 replicas: ${REPLICAS:-2}
76 volumes:
77 - ./config/apex-pdp/OnapPfConfig.json:/opt/app/policy/apex-pdp/etc/onappf/config/OnapPfConfig.json:ro
78 - ./config/apex-pdp/logback.xml:/opt/app/policy/apex-pdp/etc/logback.xml:ro
79 - ./wait_for_port.sh:/opt/app/policy/bin/wait_for_port.sh:ro
80 entrypoint: /opt/app/policy/bin/wait_for_port.sh
81 command: [
82 '-c', '/opt/app/policy/apex-pdp/bin/apexOnapPf.sh -c /opt/app/policy/apex-pdp/etc/onappf/config/OnapPfConfig.json',
83 'kafka', '9092',
84 'pap', '6969'
85 ]
86 nginx:
87 image: ${CONTAINER_LOCATION}library/nginx:latest
88 volumes:
89 - ./config/nginx/nginx.conf:/etc/nginx/nginx.conf:ro
90 depends_on:
91 - apexpdp
92 ports:
93 - ${APEX_PORT}:${APEX_PORT}
94 - ${APEX_EVENTS_PORT}:${APEX_EVENTS_PORT}