Added docker-compose ranpm
[nonrtric/plt/ranpm.git] / docker-proj / docker-compose-producers.yaml
1 #  ============LICENSE_START===============================================
2 #  Copyright (C) 2023 Nordix Foundation. 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 #  ============LICENSE_END=================================================
16 #
17
18 version: '3.0'
19 networks:
20   default:
21     external: true
22     name: nonrtric-docker-net
23
24 services:
25   kafka-producer-pm-xml2json-0:
26     image: $KPX_IMAGE
27     container_name: kafka-producer-pm-xml2json-0
28     volumes:
29     - ./config/pmfc/application_configuration_xml2json.json:/application_configuration.json
30     - ./shared-volume:$FILES_VOLUME
31     ports:
32     - 9881:80
33     labels:
34       - "ranpm=yes"
35     environment:
36       KP: kafka-producer-pm-xml2json-0
37       FILES_VOLUME: $FILES_VOLUME
38       KAFKA_SERVER: kafka-1:9097
39       ICS: ics:8083
40       SELF: kafka-producer-pm-xml2json-0:80
41       FILESTORE_USER: admin
42       FILESTORE_PWD: adminadmin
43       FILESTORE_SERVER: minio-server:9000
44       CREDS_GRANT_TYPE: client_credentials
45       CREDS_CLIENT_SECRET: $XML2JSON_CLIENT_SECRET
46       CREDS_CLIENT_ID: kafka-producer-pm-xml2json
47       AUTH_SERVICE_URL: http://keycloak:8080/realms/nonrtric-realm/protocol/openid-connect/token
48
49   auth-token-file-pm-producer-json2kafka:
50     image: $AUTH_TOKEN_IMAGE
51     environment:
52       CREDS_GRANT_TYPE: client_credentials
53       CREDS_CLIENT_SECRET: $JSON2KAFKA_CLIENT_SECRET
54       CREDS_CLIENT_ID: pm-producer-json2kafka
55       AUTH_SERVICE_URL: http://keycloak:8080/realms/nonrtric-realm/protocol/openid-connect/token
56       OUTPUT_FILE: /token-cache/jwt.txt
57     volumes:
58     - ./config/pmpr/token-cache:/token-cache
59     labels:
60       - "ranpm=yes"
61
62   pm-producer-json2kafka:
63     image: $DMAAPADP_IMAGE
64     container_name: pm-producer-json2kafka
65     depends_on:
66       - auth-token-file-pm-producer-json2kafka
67     volumes:
68     - ./config/pmpr/application_configuration.json:/opt/app/pm-producer-service/data/application_configuration.json
69     - ./config/pmpr/application.yaml:/opt/app/pm-producer-service/config/application.yaml
70     - ./config/pmpr/token-cache:/token-cache
71     - ./shared-volume:$FILES_VOLUME
72     ports:
73     - 8084:8084
74     labels:
75       - "ranpm=yes"