blob: 504032365b281190180cead274d16f3f32f955f2 [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 postgres database
20
21services:
22 postgres:
23 image: nexus3.onap.org:10001/library/postgres:${POLICY_POSTGRES_VER}
24 container_name: postgres
25 hostname: postgres
26 command: [ '--idle_in_transaction_session_timeout=28800' ]
27 env_file: config/db-pg/db-pg.conf
28 volumes:
29 - ./config/db-pg:/docker-entrypoint-initdb.d:ro
30 expose:
31 - 5432
32 ports:
33 - "5432:5432"
34
35 policy-db-migrator:
36 image: ${CONTAINER_LOCATION}onap/policy-db-migrator:${POLICY_DOCKER_VERSION}
37 container_name: policy-db-migrator
38 hostname: policy-db-migrator
39 depends_on:
40 - postgres
41 expose:
42 - 6824
43 env_file: config/db-pg/db-pg.conf
44 environment:
45 POSTGRES_PASSWORD: policy_user
46 SQL_DB: policyadmin clampacm pooling operationshistory
47 SQL_HOST: postgres
48 volumes:
49 - ./config/db-migrator/init_pg.sh:/opt/app/policy/bin/db_migrator_policy_init_pg.sh:ro
50 - ./wait_for_port.sh:/opt/app/policy/bin/wait_for_port.sh:ro
51 entrypoint: /opt/app/policy/bin/wait_for_port.sh
52 command: [
53 '-c',
54 '/opt/app/policy/bin/db_migrator_policy_init_pg.sh',
55 'postgres', '5432'
56 ]