blob: 67788824236a222a532f13ab32b3fa5005cdaec7 [file] [log] [blame]
gururajarao79542b9d12024-11-22 14:28:41 +01001version: '3.8'
2services:
3 mariadb:
4 image: nexus3.onap.org:10001/mariadb:10.10.2
5 container_name: mariadb
6 hostname: mariadb
7 command: ['--lower-case-table-names=1', '--wait_timeout=28800', '--default-authentication-plugin=mysql_native_password']
8 env_file: ./config/db/db.conf
9 volumes:
10 - ./config/db:/docker-entrypoint-initdb.d
11 - ./config/clamp/policy-clamp-create-tables.sql:/tmp/policy-clamp-create-tables.sql
12 ports:
13 - "3306:3306"
14 policy-db-migrator:
15 image: nexus3.onap.org:10001/onap/policy-db-migrator:4.0.1-SNAPSHOT
16 container_name: policy-db-migrator
17 hostname: policy-db-migrator
18 depends_on:
19 - mariadb
20 expose:
21 - 6824
22 env_file: ./config/db/db.conf
23 environment:
24 SQL_DB: policyadmin
25 SQL_HOST: mariadb
26 volumes:
27 - ./config/db-migrator/init.sh:/opt/app/policy/bin/db_migrator_policy_init.sh:ro
28 - ./wait_for_port.sh:/tmp/wait_for_port.sh
29 entrypoint: sh /tmp/wait_for_port.sh
30 command: [
31 '-c',
32 '/opt/app/policy/bin/db_migrator_policy_init.sh',
33 'mariadb', '3306'
34 ]
35 api:
36 image: nexus3.onap.org:10001/onap/policy-api:4.0.1-SNAPSHOT
37 container_name: policy-api
38 depends_on:
39 - policy-db-migrator
40 hostname: policy-api
41 ports:
42 - 30002:6969
43 volumes:
44 - ./config/api/apiParameters.yaml:/opt/app/policy/api/etc/apiParameters.yaml:ro
45 - ./config/api/logback.xml:/opt/app/policy/api/etc/logback.xml:ro
46 - ./wait_for_port.sh:/opt/app/policy/api/bin/wait_for_port.sh
47 entrypoint: sh wait_for_port.sh
48 command: [
49 '-c', './policy-api.sh',
50 'mariadb', '3306',
51 'policy-db-migrator', '6824'
52 ]
53 pap:
54 image: nexus3.onap.org:10001/onap/policy-pap:4.0.1-SNAPSHOT
55 container_name: policy-pap
56 depends_on:
57 - mariadb
58 - kafka
59 - api
60 hostname: policy-pap
61 ports:
62 - 30003:6969
63 volumes:
64 - ./config/pap/papParameters.yaml:/opt/app/policy/pap/etc/papParameters.yaml:ro
65 - ./config/pap/groups.json:/opt/app/policy/pap/etc/mounted/groups.json:ro
66 - ./config/pap/logback.xml:/opt/app/policy/pap/etc/logback.xml:ro
67 - ./wait_for_port.sh:/opt/app/policy/pap/bin/wait_for_port.sh
68 entrypoint: sh wait_for_port.sh
69 command: [
70 '-c', './policy-pap.sh',
71 'mariadb', '3306',
72 'kafka', '9092',
73 'api', '6969'
74 ]
75 zookeeper:
76 image: confluentinc/cp-zookeeper:latest
77 environment:
78 ZOOKEEPER_CLIENT_PORT: 2181
79 ZOOKEEPER_TICK_TIME: 2000
80 ports:
81 - 2181:2181
82
83 pdp:
84 image: docker.io/opa-pdp:1.0.0
85 container_name: opa-pdp
86 depends_on:
87 - mariadb
88 - kafka
89 - api
90 - pap
91 hostname: opa-pdp
92 volumes:
93 - ./config/opa-pdp/config.json:/app/config/config.json:ro
94 - ./config/opa-pdp/groups.json:/app/groups.json:ro
95 - ./config/opa-pdp/policy-opa-pdp.sh:/app/policy-opa-pdp.sh:ro
96 - ./wait_for_port.sh:/app/wait_for_port.sh
97 - ./scripts.sh:/app/scripts.sh
98 - ./Opagroup.json:/app/Opagroup.json
99 - ./policy-new.yaml:/app/policy-new.yaml
100 - type: bind
101 source: ./policies
102 target: /app/policies
103
104 environment:
105 LOG_LEVEL: debug
106 KAFKA_URL: "kafka:9092"
107 PAP_TOPIC: policy-pdp-pap
108 GROUPID: opa-pdp
109 API_USER: policyadmin
110 API_PASSWORD: "zb!XztG34"
111 entrypoint: sh wait_for_port.sh
112 command: [
113 '-c', './policy-opa-pdp.sh',
114 'mariadb', '3306',
115 'kafka', '9092',
116 'api', '6969',
117 'pap', '6969'
118 ]
119 ports:
120 - 8282:8282
121 zookeeper:
122 image: confluentinc/cp-zookeeper:latest
123 environment:
124 ZOOKEEPER_CLIENT_PORT: 2181
125 ZOOKEEPER_TICK_TIME: 2000
126 ports:
127 - 2181:2181
128
129 kafka:
130 image: confluentinc/cp-kafka:latest
131 container_name: kafka
132 depends_on:
133 - zookeeper
134 ports:
135 - 29092:29092
136 - 9092:9092
137 environment:
138 KAFKA_BROKER_ID: 1
139 KAFKA_ZOOKEEPER_CONNECT: zookeeper:2181
140 KAFKA_ADVERTISED_LISTENERS: PLAINTEXT://kafka:9092,PLAINTEXT_HOST://localhost:29092
141 KAFKA_LISTENER_SECURITY_PROTOCOL_MAP: PLAINTEXT:PLAINTEXT,PLAINTEXT_HOST:PLAINTEXT
142 KAFKA_INTER_BROKER_LISTENER_NAME: PLAINTEXT
143 KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR: 1