init commit

This commit is contained in:
2026-10-14 18:09:06 +03:00
parent 0ab3a341aa
commit 9d0080db10
84 changed files with 4943 additions and 27 deletions
+85
View File
@@ -0,0 +1,85 @@
spring:
application:
name: messenger-lab2
config:
import: "optional:configtree:/run/secrets/"
lifecycle:
timeout-per-shutdown-phase: 10s
jackson:
default-property-inclusion: non_null
deserialization:
fail-on-unknown-properties: true
datasource:
driver-class-name: org.postgresql.Driver
url: ${SPRING_DATASOURCE_URL:jdbc:postgresql://localhost:5432/messenger}
username: ${SPRING_DATASOURCE_USERNAME:messenger}
password: ${SPRING_DATASOURCE_PASSWORD:change-me-local-only}
hikari:
connection-timeout: 2000
validation-timeout: 1000
maximum-pool-size: 10
minimum-idle: 2
idle-timeout: 60000
max-lifetime: 1800000
jpa:
hibernate:
ddl-auto: validate
open-in-view: false
properties:
hibernate:
jdbc:
time_zone: UTC
dialect: org.hibernate.dialect.PostgreSQLDialect
flyway:
enabled: true
locations: classpath:db/migration
data:
redis:
host: ${SPRING_DATA_REDIS_HOST:localhost}
port: ${SPRING_DATA_REDIS_PORT:6379}
cache:
type: redis
server:
address: ${APP_HOST:0.0.0.0}
port: ${APP_PORT:8080}
shutdown: graceful
management:
endpoints:
web:
exposure:
include: health,metrics,caches
endpoint:
health:
probes:
enabled: true
show-details: always
caches:
enabled: true
app:
limits:
max-messages-per-chat: ${MAX_MESSAGES_PER_CHAT:10000}
rate:
rate-per-minute: ${RATE_PER_MINUTE:600}
retry-after-seconds: ${RETRY_AFTER_SECONDS:60}
session:
ttl: ${SESSION_TTL_SECONDS:400}s
redis:
host: ${SPRING_DATA_REDIS_HOST:localhost}
port: ${SPRING_DATA_REDIS_PORT:6379}
command-timeout: ${REDIS_COMMAND_TIMEOUT:500ms}
connect-timeout: ${REDIS_CONNECT_TIMEOUT:500ms}
shutdown-timeout: ${REDIS_SHUTDOWN_TIMEOUT:100ms}
keep-alive-idle: ${REDIS_KEEP_ALIVE_IDLE:30s}
keep-alive-interval: ${REDIS_KEEP_ALIVE_INTERVAL:10s}
tcp-user-timeout: ${REDIS_TCP_USER_TIMEOUT:10s}
logging:
pattern:
console: "%d{ISO8601} %-5level [%X{requestId}] %logger{20} - %msg%n"
level:
org.springframework.cache: TRACE
org.springframework.cache.interceptor: TRACE