blob: 2dbae99f8ce62eaabdc4457aab1a22425dc478b5 [file] [log] [blame]
adheli.tavaresd802fd92024-08-15 12:39:19 +01001#
2# ===========LICENSE_START====================================================
3# Copyright (C) 2024 Nordix Foundation.
4# ============================================================================
5# Licensed under the Apache License, Version 2.0 (the "License");
6# you may not use this file except in compliance with the License.
7# You may obtain a copy of the License at
8#
9# http://www.apache.org/licenses/LICENSE-2.0
10#
11# Unless required by applicable law or agreed to in writing, software
12# distributed under the License is distributed on an "AS IS" BASIS,
13# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14# See the License for the specific language governing permissions and
15# limitations under the License.
16# ============LICENSE_END=====================================================
17#
18
19# Services running against mariadb
20
21services:
22
23 mariadb:
24 image: nexus3.onap.org:10001/mariadb:${POLICY_MARIADB_VER}
25 container_name: mariadb
26 hostname: mariadb
27 command: [ '--lower-case-table-names=1', '--wait_timeout=28800', '--default-authentication-plugin=mysql_native_password' ]
28 env_file: config/db/db.conf
29 volumes:
30 - ./config/db:/docker-entrypoint-initdb.d:ro
31 ports:
32 - "3306:3306"
33
34 policy-db-migrator:
35 image: ${CONTAINER_LOCATION}onap/policy-db-migrator:${POLICY_DOCKER_VERSION}
36 container_name: policy-db-migrator
37 hostname: policy-db-migrator
38 depends_on:
39 - mariadb
40 expose:
41 - 6824
42 env_file: config/db/db.conf
43 environment:
44 SQL_DB: policyadmin clampacm pooling operationshistory
45 SQL_HOST: mariadb
46 volumes:
47 - ./config/db-migrator/init.sh:/opt/app/policy/bin/db_migrator_policy_init.sh:ro
48 - ./wait_for_port.sh:/opt/app/policy/bin/wait_for_port.sh:ro
49 entrypoint: /opt/app/policy/bin/wait_for_port.sh
50 command: [
51 '-c',
52 '/opt/app/policy/bin/db_migrator_policy_init.sh',
53 'mariadb', '3306'
54 ]