mirror of
https://github.com/koala73/worldmonitor.git
synced 2026-04-25 17:14:57 +02:00
Ubuntu's noble-security package-index CDN is returning hash-sum
mismatches (2026-04-17), causing ALL Railway NIXPACKS builds to fail
at the 'apt-get update && apt-get install curl' layer with exit
code 100. Multiple Railway services are red.
NIXPACKS' aptPkgs = ['curl'] generates a strict
'apt-get update && apt-get install -y' that fails hard on any
mirror error. Fix: replace aptPkgs with manual cmds that:
1. Allow apt-get update to partially fail (|| true)
2. Use --fix-missing on apt-get install so packages from healthy
mirrors still install even if one mirror is broken
Same treatment for consumer-prices-core/Dockerfile.
Files changed:
- nixpacks.toml (root — used by ais-relay + standalone cron seeders)
- scripts/nixpacks.toml (used by bundled seed services)
- consumer-prices-core/Dockerfile
The || true on apt-get update is safe because:
1. curl is the only package we install and it's often already present
in the NIXPACKS base image (nix-env provides it)
2. If curl genuinely isn't available, the seeder will fail at runtime
with a clear 'curl: not found' error — not a silent degradation
47 lines
1.1 KiB
Docker
47 lines
1.1 KiB
Docker
FROM node:20-slim AS base
|
|
WORKDIR /app
|
|
|
|
# Install Playwright dependencies. Tolerate transient Ubuntu mirror failures
|
|
# (2026-04-17: noble-security CDN hash-sum mismatch blocked all Railway builds).
|
|
RUN (apt-get update || true) && apt-get install -y --fix-missing \
|
|
chromium \
|
|
fonts-liberation \
|
|
libatk-bridge2.0-0 \
|
|
libatk1.0-0 \
|
|
libcairo2 \
|
|
libcups2 \
|
|
libdbus-1-3 \
|
|
libgdk-pixbuf2.0-0 \
|
|
libnspr4 \
|
|
libnss3 \
|
|
libpango-1.0-0 \
|
|
libx11-6 \
|
|
libxcomposite1 \
|
|
libxdamage1 \
|
|
libxext6 \
|
|
libxfixes3 \
|
|
libxrandr2 \
|
|
libxrender1 \
|
|
--no-install-recommends && rm -rf /var/lib/apt/lists/*
|
|
|
|
ENV PLAYWRIGHT_CHROMIUM_EXECUTABLE_PATH=/usr/bin/chromium
|
|
|
|
# Install all dependencies (including devDeps for tsc)
|
|
COPY package.json package-lock.json ./
|
|
RUN npm ci
|
|
|
|
# Build
|
|
COPY tsconfig.json ./
|
|
COPY src ./src
|
|
COPY configs ./configs
|
|
COPY migrations ./migrations
|
|
RUN npm run build
|
|
|
|
# Prune dev dependencies after build
|
|
RUN npm prune --omit=dev
|
|
|
|
# Runtime
|
|
ENV NODE_ENV=production
|
|
EXPOSE 3400
|
|
CMD ["node", "dist/api/server.js"]
|