spring: application: name: tbp-core-service profiles: active: prod jackson: deserialization: accept-float-as-int: false jpa: open-in-view: true flyway: enabled: true baseline-on-migrate: true locations: classpath:db/migration threads: virtual: enabled: true mvc: apiversion: use: query-parameter: version default: "1.0" supported: 1.0, 2,0 server: port: 8090 management: endpoints: web: exposure: include: health endpoint: health: show-details: never security: jwt: public-key: ${JWT_PUBLIC_KEY:} jwks-url: ${JWT_JWKS_URL:} app: build: # Filled from the CI run by the Dockerfile. commit: ${APP_BUILD_COMMIT:dev} time: ${APP_BUILD_TIME:} cors: allowed-origins: "https://tbp.andreas-dahm.eu" steam: api-key: ${STEAM_API_KEY} base-url: https://api.steampowered.com imageService-url: https://cdn.cloudflare.steamstatic.com/steam/apps/ igdb: # A Twitch developer app (dev.twitch.tv). Without both values time to beat is off. client-id: ${IGDB_CLIENT_ID:} client-secret: ${IGDB_CLIENT_SECRET:} base-url: https://api.igdb.com/v4 token-base-url: https://id.twitch.tv speedrun: # No key needed. false stops every call to speedrun.com. enabled: true base-url: https://www.speedrun.com/api/v1 library: sync-ttl-hours: 24 force-sync-cooldown-seconds: 60 running-stale-minutes: 5 achievement-ttl-hours: 1 schema-ttl-days: 30 speedrun-ttl-days: 30 # Reported broken pictures, repaired after the nightly sync. image-repair-cron: "0 30 1 * * *" image-repair-batch: 200 image-repair-max-attempts: 3 image-repair-retry-days: 30 account-cleanup: # Log only, delete nothing. Auth's nightly cleanup drives this; see the Deployment README before flipping it. dry-run: ${APP_ACCOUNT_CLEANUP_DRY_RUN:true} # A prune refuses more orphans than this per run; raise it once for a big cleanup. max-orphans: 5 resilience4j: retry: instances: steamApi: max-attempts: 3 wait-duration: 500ms enable-exponential-backoff: true exponential-backoff-multiplier: 2 retry-exceptions: - org.springframework.web.client.RestClientException - org.springframework.web.client.ResourceAccessException # A 4xx (a refused key, a private list) is the same on the next try. ignore-exceptions: - org.springframework.web.client.HttpClientErrorException # Calls a page waits for, and the optional wishlist: one try, else a Steam outage holds every page (or the # sync) for three read timeouts. steamApiOnce: max-attempts: 1 ratelimiter: instances: steamApi: # Steam allows ~100k req/day. Cap at ~2 req/s to leave headroom for bursts. limit-for-period: 2 limit-refresh-period: 1s timeout-duration: 5s speedrunApi: # speedrun.com allows 100 requests/min per IP. limit-for-period: 1 limit-refresh-period: 1s timeout-duration: 30s igdbApi: # IGDB allows 4 requests/s. Taken per HTTP request. limit-for-period: 4 limit-refresh-period: 1s timeout-duration: 10s