Files
nahodka-back/src/main/resources/application.yaml
2026-10-18 23:46:13 +03:00

90 lines
3.1 KiB
YAML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

ffmpeg:
binary-path: ${FFMPEG_PATH:C:\ffmpeg\ffmpeg-9.0.2-essentials_build\bin\ffmpeg.exe}
spring:
servlet:
multipart:
max-file-size: 10MB
max-request-size: 20MB
datasource:
url: ${DB_URL:jdbc:postgresql://localhost:5432/nahodka}
username: ${DB_USER:user}
password: ${DB_PASSWORD:pass}
driver-class-name: org.postgresql.Driver
jpa:
hibernate:
# Схемой управляет Liquibase. "update" молча правил таблицы мимо changelog,
# из-за чего базы расходились. Для разработки можно переопределить
# переменной окружения JPA_DDL_AUTO=update.
ddl-auto: ${JPA_DDL_AUTO:validate}
show-sql: ${JPA_SHOW_SQL:true}
properties:
hibernate:
format_sql: true
data:
redis:
host: ${REDIS_HOST:localhost}
port: 6379
password: ${REDIS_PASSWORD}
timeout: 500ms
connect-timeout: 500ms
web:
pageable:
max-page-size: 50
liquibase:
change-log: classpath:db/changelog/db.changelog-master.yaml
minio:
endpoint: ${MINIO_ENDPOINT:http://localhost:9010}
bucket: ${MINIO_BUCKET:refound-images}
ads-bucket: ${MINIO_ADS_BUCKET:ads-media}
access-key: ${MINIO_ACCESS_KEY}
secret-key: ${MINIO_SECRET_KEY}
region: ${MINIO_REGION:us-east-1}
ai:
url: ${AI_SERVICE_URL:http://localhost:8000}
timeout: 10
image-timeout: ${AI_IMAGE_TIMEOUT:30}
retry:
max-attempts: 3
delay: 500
multiplier: 2
# Поиск по объявлениям (PostSearchService)
search:
typo-threshold: 0.3
min-prefix-length: 3
# Слово из группы ищется вместе со всеми словами группы. Форма слова не важна —
# к основе приводит русский стеммер Postgres. Синонимы из нескольких слов не поддерживаются.
synonyms:
- [кот, кошка, котёнок, котята, котик]
- [собака, пёс, щенок, щенки, собачка, пёсик]
- [телефон, смартфон, мобильник, айфон, iphone]
- [кошелёк, портмоне, бумажник]
- [ключи, ключ, связка]
- [паспорт, документы]
- [рюкзак, ранец]
- [очки, окуляры]
- [попугай, попугайчик]
# Подсказки при вводе (SearchSuggestService): словарь слов из заголовков объявлений
suggest:
limit: 8
min-length: 2
typo-min-length: 4
typo-threshold: 0.5
refresh-interval: PT10M # пересборка словаря
flush-interval: PT1M # запись накопленной статистики поисков
jwt:
secret: ${JWT_SECRET}
access-expiration: ${JWT_ACCESS_EXPIRATION:900000} # 15 минут
refresh-expiration: ${JWT_REFRESH_EXPIRATION:604800000} # 7 дней
app:
cors:
allowed-origins: ${CORS_ALLOWED_ORIGINS:http://localhost:5173,http://localhost:3000,http://192.168.1.76:3000}