CI: Add SonarCloud scan GHA workflow
[nonrtric/plt/ranpm.git] / docker-proj / docker-compose-pmlog.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   auth-token-file-pmlog-0:
26     image: $AUTH_TOKEN_IMAGE
27     environment:
28       CREDS_GRANT_TYPE: client_credentials
29       CREDS_CLIENT_SECRET: $PMLOG_CLIENT_SECRET
30       CREDS_CLIENT_ID: nrt-pm-log
31       AUTH_SERVICE_URL: http://keycloak:8080/realms/nonrtric-realm/protocol/openid-connect/token
32       OUTPUT_FILE: /token-cache/jwt.txt
33     volumes:
34     - ./config/pmlog/token-cache:/token-cache
35     labels:
36       - "ranpm=yes"
37       - "ranpmlog=yes"
38
39   pmlog-0:
40     image: $PMLOG_IMAGE
41     container_name: pmlog-0
42     depends_on:
43       - auth-token-file-pmlog-0
44     environment:
45       APP_INFLUX_ACCESSTOKEN: $INFLUXDB2_TOKEN
46     volumes:
47     - ./config/pmlog/jobDefinition.json:/opt/app/pmlog-service/config/jobDefinition.json
48     - ./config/pmlog/application.yaml:/opt/app/pmlog-service/config/application.yaml
49     - ./config/pmlog/token-cache:/token-cache
50     ports:
51     - 8184:8084
52     - 8436:8436
53     labels:
54       - "ranpm=yes"
55       - "ranpmlog=yes"