103 lines
3.1 KiB
YAML
103 lines
3.1 KiB
YAML
spring:
|
|
datasource:
|
|
url: ${SPRING_DATASOURCE_URL:jdbc:postgresql://localhost:5432/storycove}
|
|
username: ${SPRING_DATASOURCE_USERNAME:storycove}
|
|
password: ${SPRING_DATASOURCE_PASSWORD:password}
|
|
driver-class-name: org.postgresql.Driver
|
|
|
|
jpa:
|
|
hibernate:
|
|
ddl-auto: update
|
|
properties:
|
|
hibernate:
|
|
dialect: org.hibernate.dialect.PostgreSQLDialect
|
|
format_sql: true
|
|
show-sql: false
|
|
|
|
servlet:
|
|
multipart:
|
|
max-file-size: 256MB # Increased for backup restore
|
|
max-request-size: 260MB # Slightly higher to account for form data
|
|
|
|
jackson:
|
|
serialization:
|
|
write-dates-as-timestamps: false
|
|
deserialization:
|
|
adjust-dates-to-context-time-zone: false
|
|
|
|
server:
|
|
port: 8080
|
|
|
|
storycove:
|
|
app:
|
|
public-url: ${STORYCOVE_PUBLIC_URL:http://localhost:6925}
|
|
cors:
|
|
allowed-origins: ${STORYCOVE_CORS_ALLOWED_ORIGINS:http://localhost:3000,http://localhost:6925}
|
|
jwt:
|
|
secret: ${JWT_SECRET} # REQUIRED: Must be at least 32 characters, no default for security
|
|
expiration: 86400000 # 24 hours
|
|
auth:
|
|
password: ${APP_PASSWORD} # REQUIRED: No default password for security
|
|
search:
|
|
engine: solr # Apache Solr search engine
|
|
solr:
|
|
# Connection settings
|
|
url: ${SOLR_URL:http://solr:8983/solr}
|
|
username: ${SOLR_USERNAME:}
|
|
password: ${SOLR_PASSWORD:}
|
|
|
|
# Core configuration
|
|
cores:
|
|
stories: ${SOLR_STORIES_CORE:storycove_stories}
|
|
authors: ${SOLR_AUTHORS_CORE:storycove_authors}
|
|
|
|
# Connection settings
|
|
connection:
|
|
timeout: ${SOLR_CONNECTION_TIMEOUT:30000} # 30 seconds
|
|
socket-timeout: ${SOLR_SOCKET_TIMEOUT:60000} # 60 seconds
|
|
max-connections-per-route: ${SOLR_MAX_CONN_PER_ROUTE:10}
|
|
max-connections-total: ${SOLR_MAX_CONN_TOTAL:30}
|
|
retry-on-failure: ${SOLR_RETRY_ON_FAILURE:true}
|
|
max-retries: ${SOLR_MAX_RETRIES:3}
|
|
|
|
# Query settings
|
|
query:
|
|
default-rows: ${SOLR_DEFAULT_ROWS:10}
|
|
max-rows: ${SOLR_MAX_ROWS:1000}
|
|
default-operator: ${SOLR_DEFAULT_OPERATOR:AND}
|
|
highlight: ${SOLR_ENABLE_HIGHLIGHT:true}
|
|
facets: ${SOLR_ENABLE_FACETS:true}
|
|
|
|
# Commit settings
|
|
commit:
|
|
soft-commit: ${SOLR_SOFT_COMMIT:true}
|
|
commit-within: ${SOLR_COMMIT_WITHIN:1000} # 1 second
|
|
wait-searcher: ${SOLR_WAIT_SEARCHER:false}
|
|
|
|
# Health and monitoring
|
|
health:
|
|
check-interval: ${SOLR_HEALTH_CHECK_INTERVAL:30000} # 30 seconds
|
|
slow-query-threshold: ${SOLR_SLOW_QUERY_THRESHOLD:5000} # 5 seconds
|
|
enable-metrics: ${SOLR_ENABLE_METRICS:true}
|
|
images:
|
|
storage-path: ${IMAGE_STORAGE_PATH:/app/images}
|
|
|
|
management:
|
|
endpoints:
|
|
web:
|
|
exposure:
|
|
include: health,info,prometheus
|
|
endpoint:
|
|
health:
|
|
show-details: when-authorized
|
|
show-components: always
|
|
health:
|
|
solr:
|
|
enabled: ${SOLR_HEALTH_ENABLED:true}
|
|
|
|
logging:
|
|
level:
|
|
com.storycove: ${LOG_LEVEL:INFO} # Use INFO for production, DEBUG for development
|
|
org.springframework.security: WARN # Reduce security logging
|
|
org.springframework.web: WARN
|
|
org.hibernate.SQL: ${SQL_LOG_LEVEL:WARN} # Control SQL logging separately |