Merge "Update for new code coverage sonarcloud configuration Issue-ID: EXTAPI-400...
[externalapi/nbi.git] / docker-compose.yml
1 #
2 #     Copyright (c) 2018 Orange
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 #
16
17 version: "2.1"
18 services:
19   mongo:
20     image: mongo:latest
21     restart: always
22     volumes:
23       - /var/lib/mongo
24     command: --smallfiles
25
26   mariadb:
27     image: mariadb:latest
28     restart: always
29     volumes:
30       - /var/lib/mariadb
31     environment:
32       MYSQL_DATABASE: nbi
33       MYSQL_PASSWORD: toto
34       MYSQL_RANDOM_ROOT_PASSWORD: 'yes'
35       MYSQL_USER: rene
36   # APP  ***************************************************************************************
37   nbi:
38     image: ${NEXUS_DOCKER_REPO}/onap/externalapi/nbi:${DOCKER_IMAGE_VERSION:-latest}
39     ports:
40       - 8080:8080
41       - 8443:8443
42     env_file:
43       - .env
44     environment:
45       SPRING_DATASOURCE_URL: jdbc:mariadb://mariadb:3306/nbi
46       SPRING_DATASOURCE_PASSWORD: toto
47       SPRING_DATASOURCE_USERNAME: rene
48       SPRING_DATA_MONGODB_HOST: mongo
49       SDC_HOST: http://${SDC_IP}:8080
50       AAI_HOST: https://${AAI_IP}:8443
51       SO_HOST: http://${SO_IP}:8080
52     restart: on-failure
53     depends_on:
54       - mariadb
55       - mongo
56 volumes:
57   mariadb:
58   mongo: