More ActivityPub
This commit is contained in:
parent
fe5bc54e92
commit
1901daf5ce
17 changed files with 593 additions and 78 deletions
54
src/main/resources/application-dev.yml
Normal file
54
src/main/resources/application-dev.yml
Normal file
|
|
@ -0,0 +1,54 @@
|
|||
# Development profile configuration
|
||||
# Activated with: mvn spring-boot:run -Dspring-boot.run.profiles=dev
|
||||
|
||||
spring:
|
||||
# Development datasource is handled by Testcontainers (see TestcontainersConfiguration)
|
||||
# No need to configure datasource here - it's automatically configured
|
||||
|
||||
jpa:
|
||||
hibernate:
|
||||
ddl-auto: update # Auto-update schema in dev mode
|
||||
show-sql: true # Show SQL queries in console
|
||||
properties:
|
||||
hibernate:
|
||||
format_sql: true # Format SQL for readability
|
||||
use_sql_comments: true # Add comments to SQL
|
||||
|
||||
# Development-specific FitPub configuration
|
||||
fitpub:
|
||||
domain: ${FITPUB_DOMAIN:localhost:8080}
|
||||
base-url: ${FITPUB_BASE_URL:http://localhost:8080}
|
||||
|
||||
activitypub:
|
||||
enabled: true
|
||||
max-federation-retries: 3
|
||||
request-timeout-seconds: 30
|
||||
|
||||
security:
|
||||
jwt:
|
||||
# Use a default secret for development (override with env var for security)
|
||||
secret: ${JWT_SECRET:dev-secret-key-change-in-production-must-be-at-least-32-characters-long}
|
||||
expiration: 86400000 # 24 hours
|
||||
|
||||
storage:
|
||||
fit-files:
|
||||
enabled: true
|
||||
retention-days: 365
|
||||
|
||||
# Logging - verbose in development
|
||||
logging:
|
||||
level:
|
||||
root: INFO
|
||||
org.operaton.fitpub: DEBUG
|
||||
org.hibernate.SQL: DEBUG
|
||||
org.hibernate.type.descriptor.sql.BasicBinder: TRACE
|
||||
org.springframework.security: DEBUG
|
||||
org.springframework.web: DEBUG
|
||||
|
||||
# Server configuration
|
||||
server:
|
||||
port: ${PORT:8080}
|
||||
error:
|
||||
include-message: always
|
||||
include-binding-errors: always
|
||||
include-stacktrace: always # Show stack traces in dev mode
|
||||
86
src/main/resources/application-prod.yml
Normal file
86
src/main/resources/application-prod.yml
Normal file
|
|
@ -0,0 +1,86 @@
|
|||
# Production profile configuration
|
||||
# Activated with: java -jar fitpub.jar --spring.profiles.active=prod
|
||||
|
||||
spring:
|
||||
# Production datasource - must be configured via environment variables
|
||||
datasource:
|
||||
url: ${SPRING_DATASOURCE_URL}
|
||||
username: ${SPRING_DATASOURCE_USERNAME}
|
||||
password: ${SPRING_DATASOURCE_PASSWORD}
|
||||
hikari:
|
||||
maximum-pool-size: 20
|
||||
minimum-idle: 5
|
||||
connection-timeout: 30000
|
||||
idle-timeout: 600000
|
||||
max-lifetime: 1800000
|
||||
|
||||
jpa:
|
||||
hibernate:
|
||||
ddl-auto: validate # Never auto-update schema in production!
|
||||
show-sql: false # Don't log SQL in production
|
||||
properties:
|
||||
hibernate:
|
||||
format_sql: false
|
||||
use_sql_comments: false
|
||||
jdbc:
|
||||
batch_size: 20
|
||||
order_inserts: true
|
||||
order_updates: true
|
||||
|
||||
# Production-specific FitPub configuration
|
||||
fitpub:
|
||||
# Must be configured via environment variables
|
||||
domain: ${FITPUB_DOMAIN}
|
||||
base-url: ${FITPUB_BASE_URL}
|
||||
|
||||
activitypub:
|
||||
enabled: true
|
||||
max-federation-retries: 3
|
||||
request-timeout-seconds: 30
|
||||
|
||||
security:
|
||||
jwt:
|
||||
# Must be configured via environment variables
|
||||
secret: ${JWT_SECRET}
|
||||
expiration: 86400000 # 24 hours
|
||||
|
||||
storage:
|
||||
fit-files:
|
||||
enabled: true
|
||||
retention-days: 365
|
||||
|
||||
# Logging - minimal in production
|
||||
logging:
|
||||
level:
|
||||
root: WARN
|
||||
org.operaton.fitpub: INFO
|
||||
org.hibernate.SQL: WARN
|
||||
org.springframework.security: WARN
|
||||
org.springframework.web: WARN
|
||||
file:
|
||||
name: /var/log/fitpub/application.log
|
||||
max-size: 10MB
|
||||
max-history: 30
|
||||
|
||||
# Server configuration
|
||||
server:
|
||||
port: ${PORT:8080}
|
||||
error:
|
||||
include-message: never # Don't expose error details
|
||||
include-binding-errors: never
|
||||
include-stacktrace: never
|
||||
compression:
|
||||
enabled: true
|
||||
mime-types: text/html,text/xml,text/plain,text/css,text/javascript,application/javascript,application/json
|
||||
http2:
|
||||
enabled: true
|
||||
|
||||
# Actuator for monitoring (optional - configure with care)
|
||||
management:
|
||||
endpoints:
|
||||
web:
|
||||
exposure:
|
||||
include: health,info,metrics
|
||||
endpoint:
|
||||
health:
|
||||
show-details: when-authorized
|
||||
Loading…
Add table
Add a link
Reference in a new issue