-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathapplication-local.yaml.example
More file actions
155 lines (145 loc) · 4.12 KB
/
application-local.yaml.example
File metadata and controls
155 lines (145 loc) · 4.12 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
spring:
application:
name: invernaderos
# Configuración de Email (Google SMTP)
mail:
host: smtp.gmail.com
port: 587
username: ${MAIL_USERNAME}
password: ${MAIL_PASSWORD}
properties:
mail:
smtp:
auth: true
starttls:
enable: true
test-connection: false # Evitar intentar conectar al inicio si no están configuradas las credenciales
# DataSource Primario - TimescaleDB
datasource:
url: jdbc:postgresql://timescaledb:5432/greenhouse_timeseries
username: admin
password: ${TIMESCALE_PASSWORD}
driver-class-name: org.postgresql.Driver
configuration:
connection-timeout: 30000
idle-timeout: 600000
max-lifetime: 1800000
maximum-pool-size: 20
minimum-idle: 5
pool-name: TimescaleHikariPool
# DataSource Secundario - PostgreSQL Metadata
datasource-metadata:
url: jdbc:postgresql://postgresql-metadata:5432/greenhouse_metadata
username: admin
password: ${METADATA_PASSWORD}
driver-class-name: org.postgresql.Driver
configuration:
connection-timeout: 30000
idle-timeout: 600000
max-lifetime: 1800000
maximum-pool-size: 10
minimum-idle: 3
pool-name: MetadataHikariPool
# MQTT Broker
mqtt:
broker:
url: ${MQTT_BROKER_URL:tcp://emqx:1883}
username: ${MQTT_USERNAME}
password: ${MQTT_PASSWORD}
client:
id-prefix: ${MQTT_CLIENT_ID_PREFIX:api_local_001}
clean-session: false
connection-timeout: 10
keep-alive-interval: 60
automatic-reconnect: true
topics:
sensors-pattern: "GREENHOUSE"
actuators-pattern: "greenhouse/+/actuators/#"
actuators-status: "greenhouse/+/actuators/status"
system-events: "system/events/#"
alerts: "greenhouse/+/alerts/#"
response: "GREENHOUSE/RESPONSE"
qos:
sensors: 0
actuators: 1
alerts: 2
default: 0
message:
retained: false
max-payload-size: 1048576
# Configuración JPA/Hibernate
jpa:
hibernate:
ddl-auto: update # Use 'update' for local development
properties:
hibernate:
dialect: org.hibernate.dialect.PostgreSQLDialect
format_sql: true
use_sql_comments: true
jdbc:
batch_size: 20
show-sql: true # Enable SQL logging in local
# Configuración Redis
data:
redis:
host: ${REDIS_HOST:redis}
port: ${REDIS_PORT:6379}
password: ${REDIS_PASSWORD}
database: 0
timeout: 60000ms
connect-timeout: 10000ms
client-name: timeseries-app-local
client-type: lettuce
lettuce:
pool:
enabled: true
max-active: 100
max-idle: 50
min-idle: 10
max-wait: 3000ms
time-between-eviction-runs: 60s
shutdown-timeout: 100ms
# Configuración de Cache con Redis
cache:
type: redis
redis:
time-to-live: 600000 # 10 minutos
cache-null-values: false
key-prefix: "ts-app-local::"
use-key-prefix: true
# Configuración de Jackson
jackson:
serialization:
write-dates-as-timestamps: false
write-durations-as-timestamps: false
indent-output: true # Pretty print in local for debugging
deserialization:
fail-on-unknown-properties: false
default-property-inclusion: non_null
time-zone: UTC
# Configuración de SpringDoc OpenAPI/Swagger
springdoc:
api-docs:
path: /v3/api-docs
enabled: true
swagger-ui:
path: /swagger-ui.html
enabled: true
operations-sorter: method
tags-sorter: alpha
try-it-out-enabled: true
display-request-duration: true
default-models-expand-depth: 1
default-model-expand-depth: 1
show-actuator: true # Show actuator endpoints in local
logging:
level:
root: INFO
org.springframework.data.redis: DEBUG
io.lettuce.core: DEBUG
org.hibernate.SQL: DEBUG
org.hibernate.type.descriptor.sql.BasicBinder: TRACE
org.springframework.integration.mqtt: DEBUG
com.apptolast.invernaderos: DEBUG
pattern:
console: "%d{yyyy-MM-dd HH:mm:ss.SSS} %5p [%15.15t] %-40.40logger{39} : %m%n"