Upgrade SDN-C
[cps.git] / csit / plans / cps / sdnc / docker-compose.yml
1 # ============LICENSE_START=======================================================
2 # Copyright (C) 2021-2022 Nordix Foundation
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 version: '3'
18
19 services:
20   mariadb:
21     image: mariadb:10.5
22     ports:
23       - "3306:3306"
24     environment:
25       - MYSQL_ROOT_PASSWORD=${MYSQL_ROOT_PASSWORD:-password}
26       - MYSQL_ROOT_HOST=%
27       - MYSQL_USER=${MYSQL_USER:-sdnc}
28       - MYSQL_PASSWORD=${MYSQL_PASSWORD:-password}
29       - MYSQL_DATABASE=${MYSQL_DATABASE:-sdncdb}
30     logging:
31       driver: "json-file"
32       options:
33         max-size: "30m"
34         max-file: "5"
35
36   sdnc:
37     image: onap/sdnc-image:${VERSION:-2.2.3}
38     container_name: sdnc
39     depends_on :
40       - mariadb
41     entrypoint: ["/opt/onap/sdnc/bin/startODL.sh"]
42     ports:
43       - "8282:8181"
44     hostname:
45       sdnc
46     links:
47       - mariadb:dbhost
48       - mariadb:sdnctldb01
49       - mariadb:sdnctldb02
50     environment:
51       - MYSQL_ROOT_PASSWORD=${MYSQL_ROOT_PASSWORD:-password}
52       - MYSQL_USER=${MYSQL_USER:-sdnc}
53       - MYSQL_PASSWORD=${MYSQL_PASSWORD:-password}
54       - MYSQL_DATABASE=${MYSQL_DATABASE:-sdncdb}
55       - SDNC_CONFIG_DIR=/opt/onap/sdnc/data/properties
56       - SDNC_BIN=/opt/onap/sdnc/bin
57       - ODL_CERT_DIR=/opt/opendaylight/certs
58       - ODL_ADMIN_USERNAME=${ODL_USER:-admin}
59       - ODL_ADMIN_PASSWORD=${ODL_PASSWORD:-Kp8bJ4SXszM0WXlhak3eHlcse2gAw84vaoGGmJvUy2U}
60       - SDNC_DB_INIT=true
61       - SQL_CRYPTKEY=${SQL_CRYPTKEY:-fakECryptKey}
62
63     volumes:
64       - ./certs/certs.properties:/opt/opendaylight/certs/certs.properties
65       - ./certs/keys0.zip:/opt/opendaylight/certs/keys0.zip
66
67     dns:
68       - ${DNS_IP_ADDR-10.0.100.1}
69     logging:
70       driver: "json-file"
71       options:
72         max-size: "30m"
73         max-file: "5"