Newer
Older
teacher-diary / src / main / resources / application.yml
spring:
  application:
    name: teacher-diary

  profiles:
    active: dev

  # Database
  datasource:
    url: jdbc:postgresql://${DB_HOST:localhost}:${DB_PORT:5439}/${DB_NAME:teacher_diary}
    username: ${DB_USER:postgres}
    password: ${DB_PASSWORD:postgres}
    hikari:
      maximum-pool-size: 10
      minimum-idle: 5
      connection-timeout: 30000

  # JPA / Hibernate
  jpa:
    hibernate:
      ddl-auto: update
    open-in-view: false
    properties:
      hibernate:
        format_sql: true
        default_schema: public
        jdbc:
          time_zone: UTC

  # Flyway
  flyway:
    enabled: true
    baseline-on-migrate: true
    locations: classpath:db/migration

  # Thymeleaf
  thymeleaf:
    cache: false
    prefix: classpath:/templates/
    suffix: .html
    encoding: UTF-8
    mode: HTML

  # Email конфигурация
#  mail:
#    host: smtp.gmail.com
#    port: 587
#    username: ${MAIL_USERNAME:malexple@gmail.com}
#    password: ${MAIL_PASSWORD:poqw09123}
#    properties:
#      mail:
#        smtp:
#          auth: true
#          starttls:
#            enable: true
#            required: true
#        transport:
#          protocol: smtp
  # Email - отключено для разработки
  mail:
    host: localhost
    port: 1025

  # Messages
  messages:
    basename: messages
    encoding: UTF-8

# Server
server:
  port: ${PORT:8080}
  servlet:
    session:
      timeout: 30m
  error:
    whitelabel:
      enabled: false

# Logging
logging:
  level:
    root: INFO
    ru.mcs.diary: DEBUG
    org.springframework.security: INFO
    org.hibernate.SQL: DEBUG
    org.hibernate.type.descriptor.sql.BasicBinder: TRACE

# Application custom properties
app:
  name: Teacher Diary
  version: 0.0.1

  # Security
  security:
    password-reset-token-expiry-hours: 24
    parent-invite-token-expiry-days: 30
    remember-me-key: ${REMEMBER_ME_KEY:teacher-diary-secret-key-change-in-production}

  # Mail templates
  mail:
    from: ${MAIL_FROM:noreply@teacher-diary.ru}
    base-url: ${APP_BASE_URL:http://localhost:8080}