Files
worldmonitor/Dockerfile.relay
Elie Habib 9fe23b4051 fix(relay): install curl in Alpine image for OREF polling (#1965)
OREF uses execFileSync('curl') to bypass Akamai JA3 TLS fingerprint
blocking — Node.js fetch gets 403, curl passes. Alpine does not include
curl by default, causing spawnSync ENOENT on every poll cycle.
2026-03-21 08:36:47 +04:00

36 lines
1.2 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
COPY scripts/ais-relay.cjs ./scripts/ais-relay.cjs
# 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"]