Files
Дмитрий Соловьев 20d9eb9579 chore(config): #51 slots-service ходит к чужим API строго через gateway
- pcp-gateway-service: добавлен маршрут satellite-catalog
  (/api/pcp-satellite-catalog/** -> StripPrefix=2).
- slots-service: settings.request-service/earth-grid-service/satellite-catalog-service
  переведены на ${pcp.services.gateway}/api/pcp-<x> (код строит $base/<path>,
  gateway снимает префикс). Прямые адреса сервисов больше не используются.
2026-06-17 09:06:04 +03:00

162 lines
3.8 KiB
YAML

spring:
lifecycle.timeout-per-shutdown-phase: 40s
jackson:
default-property-inclusion: non_null
boot:
admin:
client:
instance:
service-base-url: ${pcp.services.slots}
service-path: /swagger/ui
management-base-url: ${pcp.services.slots}
health-url: ${pcp.services.slots}/actuator/health
springdoc:
swagger-ui:
enabled: true
layout: BaseLayout
path: /swagger/ui
api-docs:
enabled: true
path: /api-docs
logging:
level:
root: INFO
management:
endpoints:
web:
exposure:
include: "*"
endpoint:
health:
show-details: always
info:
enabled: true
---
spring:
config:
activate:
on-profile: local
kafka:
bootstrap-servers: ${pcp.infra.kafka.host}:${pcp.infra.kafka.port}
consumer:
group-id: pcp
template:
default-topic: pcp.tle
datasource:
driver-class-name: org.postgresql.Driver
url: jdbc:postgresql://${pcp.infra.postgres.host}:${pcp.infra.postgres.port}/pcp_slots
username: postgres
password: password
jpa:
hibernate:
ddl-auto: validate
properties:
hibernate:
dialect: org.hibernate.dialect.PostgreSQLDialect
jdbc:
lob:
non_contextual_creation: true
flyway:
enabled: true
baseline-on-migrate: true
locations: classpath:db/migration
codec:
max-in-memory-size: 20MB
# Все обращения к другим сервисам — строго через gateway (StripPrefix снимает /api/pcp-<x>).
# Напрямую по адресам сервисов slots-service не ходит.
settings:
request-service: ${pcp.services.gateway}/api/pcp-request
earth-grid-service: ${pcp.services.gateway}/api/pcp-request
satellite-catalog-service: ${pcp.services.gateway}/api/pcp-satellite-catalog
app:
kafka:
topics:
booked-slots: pcp.slots.status.v1
satellites: pcp.satellites
pcp:
booked-slots:
timeout-check-interval: 1h
timeout-threshold: 1h
slot-service:
calc:
parallelism: 8
chunk-duration-seconds: 86400
flush-threshold: 40000
stream-batch-size: 2000
source-margin-seconds: 120
server:
port: ${pcp.ports.slots:7006}
---
spring:
config:
activate:
on-profile: dev
kafka:
bootstrap-servers: ${pcp.infra.kafka.host}:${pcp.infra.kafka.port}
consumer:
group-id: pcp
template:
default-topic: pcp.tle
datasource:
driver-class-name: org.postgresql.Driver
url: "${SPRING_DATASOURCE_URL}"
username: "${SPRING_DATASOURCE_USERNAME}"
password: "${SPRING_DATASOURCE_PASSWORD}"
jpa:
hibernate:
ddl-auto: validate
properties:
hibernate:
dialect: org.hibernate.dialect.PostgreSQLDialect
jdbc:
lob:
non_contextual_creation: true
flyway:
enabled: true
baseline-on-migrate: true
locations: classpath:db/migration
codec:
max-in-memory-size: 20MB
# Все обращения к другим сервисам — строго через gateway (StripPrefix снимает /api/pcp-<x>).
# Напрямую по адресам сервисов slots-service не ходит.
settings:
request-service: ${pcp.services.gateway}/api/pcp-request
earth-grid-service: ${pcp.services.gateway}/api/pcp-request
satellite-catalog-service: ${pcp.services.gateway}/api/pcp-satellite-catalog
app:
kafka:
topics:
booked-slots: pcp.slots.status.v1
satellites: pcp.satellites
pcp:
booked-slots:
timeout-check-interval: 1h
timeout-threshold: 1h
slot-service:
calc:
parallelism: 4
chunk-duration-seconds: 86400
flush-threshold: 20000
stream-batch-size: 2000
source-margin-seconds: 120
server:
port: ${pcp.ports.slots:8080}