mirror of
https://github.com/koala73/worldmonitor.git
synced 2026-04-25 17:14:57 +02:00
* fix(relay): proxy fallback for Yahoo/Crypto, isolate OREF proxy, fix Dockerfile Yahoo Finance and CoinPaprika fail from Railway datacenter IPs (rate limiting). Added PROXY_URL fallback to fetchYahooChartDirect (used by 5 seeders) and relay chart proxy endpoint. Added shared _fetchCoinPaprikaTickers with proxy fallback + 5min cache (3 crypto seeders share one fetch). Added CoinPaprika fallback to CryptoSectors (previously had none). Isolated OREF_PROXY_AUTH exclusively for OREF alerts. OpenSky, seed-military-flights, and _proxy-utils now fall back to PROXY_URL instead of the expensive IL-exit proxy. Added seed-climate-news.mjs + _seed-utils.mjs COPY to Dockerfile.relay (missing since PR #2532). Added pizzint bootstrap hydration to cache-keys.ts, bootstrap.js, and src/services/pizzint.ts. * fix(relay): address review — remove unused reverseMap, guard double proxy - Remove dead reverseMap identity map in CryptoSectors Paprika fallback - Add _proxied flag to handleYahooChartRequest._tryProxy to prevent double proxy call on timeout→destroy→error sequence
39 lines
1.4 KiB
Docker
39 lines
1.4 KiB
Docker
# =============================================================================
|
|
# AIS Relay Sidecar
|
|
# =============================================================================
|
|
# Runs scripts/ais-relay.cjs as a standalone container.
|
|
# Dependencies: ws (WebSocket), telegram (OSINT polling), plus others in
|
|
# scripts/package.json (fast-xml-parser, @anthropic-ai/sdk, etc.)
|
|
# Set AISSTREAM_API_KEY in docker-compose.yml or Railway env.
|
|
# =============================================================================
|
|
|
|
FROM node:22-alpine
|
|
|
|
# curl required by OREF polling (Node.js JA3 fingerprint blocked by Akamai; curl passes)
|
|
RUN apk add --no-cache curl
|
|
|
|
WORKDIR /app
|
|
|
|
# Install scripts/ runtime dependencies (telegram, ws, fast-xml-parser, etc.)
|
|
COPY scripts/package.json scripts/package-lock.json ./scripts/
|
|
RUN npm ci --prefix scripts --omit=dev
|
|
|
|
# Relay script and shared helpers
|
|
COPY scripts/ais-relay.cjs ./scripts/ais-relay.cjs
|
|
COPY scripts/_proxy-utils.cjs ./scripts/_proxy-utils.cjs
|
|
COPY scripts/_seed-utils.mjs ./scripts/_seed-utils.mjs
|
|
COPY scripts/seed-climate-news.mjs ./scripts/seed-climate-news.mjs
|
|
|
|
# Shared helper required by the relay (rss-allowed-domains.cjs)
|
|
COPY shared/ ./shared/
|
|
|
|
# Data files required by the relay (telegram-channels.json, etc.)
|
|
COPY data/ ./data/
|
|
|
|
EXPOSE 3004
|
|
|
|
HEALTHCHECK --interval=30s --timeout=5s --start-period=10s --retries=3 \
|
|
CMD wget -qO- http://localhost:3004/health || exit 1
|
|
|
|
CMD ["node", "scripts/ais-relay.cjs"]
|