[DCAEGEN2] Update son-handler CSIT with CPS
[integration/csit.git] / scripts / dcaegen2-services-son-handler / sonhandler / cps-sonhandler / cps / docker-compose.yaml
1 #    ============LICENSE_START=======================================================
2 #    cps-tdmt
3 #    ================================================================================
4 #     Copyright (C) 2022 Wipro Limited.
5 #    ==============================================================================
6 #       Licensed under the Apache License, Version 2.0 (the "License");
7 #       you may not use this file except in compliance with the License.
8 #       You may obtain a copy of the License at
9 #
10 #            http://www.apache.org/licenses/LICENSE-2.0
11 #
12 #       Unless required by applicable law or agreed to in writing, software
13 #       distributed under the License is distributed on an "AS IS" BASIS,
14 #       WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 #       See the License for the specific language governing permissions and
16 #       limitations under the License.
17 #    ============LICENSE_END=========================================================
18
19
20 version: "3.3"
21 networks:
22   testsuites_sonhms-default:
23     external: TRUE
24 services:
25   cps-and-ncmp:
26     container_name: cps-and-ncmp
27     hostname: cps-and-ncmp
28     image: ${DOCKER_REPO:-nexus3.onap.org:10003}/onap/cps-and-ncmp:${VERSION:-latest}
29     ports:
30             - "8883:8080"
31             - "8887:8081"
32     networks:
33             - testsuites_sonhms-default
34     environment:
35             CPS_USERNAME: ${CPS_USERNAME:-cpsuser}
36             CPS_PASSWORD: ${CPS_PASSWORD:-cpsr0cks!}
37             DB_HOST: dbpostgresql
38             DB_USERNAME: ${DB_USERNAME:-cps}
39             DB_PASSWORD: ${DB_PASSWORD:-cps}
40             DMI_USERNAME: ${DMI_USERNAME:-cpsuser}
41             DMI_PASSWORD: ${DMI_PASSWORD:-cpsr0cks!}
42     restart: unless-stopped
43     depends_on:
44             - dbpostgresql
45                      
46   dbpostgresql:
47     container_name: dbpostgresql
48     image: postgres:13.2-alpine
49     ports:
50             - '5432:5432'
51     networks:
52             - testsuites_sonhms-default
53     environment:
54             POSTGRES_DB: cpsdb
55             POSTGRES_USER: ${DB_USERNAME:-cps}
56             POSTGRES_PASSWORD: ${DB_PASSWORD:-cps}
57   postgres:
58     image: 'postgres:12.4-alpine'
59     container_name: cps-tbdmt-postgres
60     hostname: postgres
61     environment:
62             - POSTGRES_USER=postgres
63             - POSTGRES_PASSWORD=postgres
64             - POSTGRES_DB=cps_template_db
65     ports:
66             - 5432
67     healthcheck:
68             test: ["CMD", "nc", "-z", "localhost", "5432"]
69             interval: 30s
70             timeout: 10s
71             retries: 5
72     networks:
73             - testsuites_sonhms-default
74   cps-tbdmt:
75     image: ${DOCKER_REPO:-nexus3.onap.org:10003}/onap/cps-tbdmt:${VERSION:-latest}
76     container_name: cps-tbdmt
77     hostname: cps-tbdmt
78     ports:
79             - "8088:8080"
80     volumes:
81             - "./application.yml:/app/resources/application.yml"
82     depends_on:
83             - postgres
84     restart: on-failure:10
85     networks:
86             - testsuites_sonhms-default