##
## Copyright (C) 2022 CMCC, Inc. and others. All rights reserved.
##
## Licensed under the Apache License, Version 2.0 (the "License");
## you may not use this file except in compliance with the License.
## You may obtain a copy of the License at
##
##     http://www.apache.org/licenses/LICENSE-2.0
##
## Unless required by applicable law or agreed to in writing, software
## distributed under the License is distributed on an "AS IS" BASIS,
## WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
## See the License for the specific language governing permissions and
## limitations under the License.
##
## General App Properties
server.servlet.contextPath=/api/usecaseui-server/v1
server.port=8082
spring.http.multipart.max-file-size=128MB
spring.http.multipart.max-request-size=128MB

## App DB Properties
spring.datasource.url=jdbc:postgresql://${POSTGRES_IP:127.0.0.1}:${POSTGRES_PORT:5432}/${POSTGRES_DB_NAME:uui}
spring.datasource.username=${POSTGRES_USERNAME}
spring.datasource.password=${POSTGRES_PASSWORD}
spring.jpa.properties.hibernate.dialect=org.hibernate.dialect.PostgreSQL9Dialect
spring.database.driver.classname=org.postgresql.Driver
spring.jpa.show-sql=false
spring.jpa.properties.hibernate.format_sql=false
spring.jpa.properties.hibernate.show-sql=false
spring.jpa.properties.hibernate.jdbc.lob.non_contextual_creation=true
spring.jpa.properties.hibernate.temp.use_jdbc_metadata_defaults = false
spring.jpa.properties.hibernate.current_session_context_class=org.springframework.orm.hibernate5.SpringSessionContext
spring.jpa.properties.hibernate.cache.use_second_level_cache=false
spring.jpa.properties.hibernate.cache.use_query_cache=false
#spring.jpa.properties.hibernate.allow_update_outside_transaction=true

## Basic Authentication Properties
# security.user.name=usecase
# security.user.password=usecase

## Logback Properties
logging.file.name=logs/usecaseui_server.log
logging.level.*=INFO

#enable shutdown
endpoints.shutdown.enabled=true
endpoints.shutdown.sensitive=false

{{- if (include "common.needTLS" .) }}
server.ssl.protocol=TLS
server.ssl.key-store={{ .Values.certInitializer.credsPath }}/{{ .Values.certInitializer.fqi_namespace }}.p12
server.ssl.key-store-password=${KEYSTORE_PASSWORD}
server.ssl.key-store-type=PKCS12
{{- end }}