CI: Add SonarCloud scan GHA workflow
[nonrtric/plt/ranpm.git] / docker-proj / docker-compose-dfc1.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-dfc:
26     image: $AUTH_TOKEN_IMAGE
27     environment:
28       - CREDS_GRANT_TYPE=client_credentials
29       - CREDS_CLIENT_SECRET=$DFC_CLIENT_SECRET
30       - CREDS_CLIENT_ID=dfc
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/dfc1/token-cache:/token-cache
35     labels:
36       - "ranpm=yes"
37
38   dfc1:
39     container_name: dfc1
40     user: root
41     image: $DFC_IMAGE
42     ports:
43     - 8433:8433
44     volumes:
45     - ./config/dfc1/application.yaml:/opt/app/datafile/config/application.yaml
46     - ./config/dfc1/truststore.jks:/opt/app/datafile/config/truststore.jks
47     - ./shared-volume:/tmp/onap_datafile/
48     - ./config/dfc1/token-cache:/token-cache
49     # truststore is updated in runtime
50     depends_on:
51       - auth-token-file-dfc
52     labels:
53       - "ranpm=yes"