0f3b4dbcff
CI / changes (pull_request) Successful in 2s
CI / unit (pull_request) Successful in 11s
CI / integration (pull_request) Successful in 22s
CI / ui (pull_request) Successful in 1m14s
CI / conformance (pull_request) Successful in 10s
CI / gate (pull_request) Successful in 0s
CI / deploy (pull_request) Failing after 40s
Author ui/legal/{privacy,eula}_ru.md, reworked from the source documents: the seller INN is unified (290210610742), contacts unified to the Telegram bot + email + postal address, the EULA governing-law clause leads with Russian law + jurisdiction as residence tiers, the single-binding-language clause is dropped, data collection is scoped to voluntary/support provision, and "Компания" is no longer shout-cased.
Serve both as static pages through the render sidecar, reusing a shared renderLegalHtml generalised from renderOfferHtml: new GET /privacy/ and GET /eula/ (301 from the slashless form), the markdown baked into the image, no backend fetch. Route them at the edge via the @legal caddy matcher with a CI probe asserting each page's canonical URL + the seller INN, so a missing route cannot silently fall through to the landing. Add the two links to the landing footer.
Docs baked in: ARCHITECTURE (renderer legal pages + edge routing), FUNCTIONAL (+_ru) footer, renderer/README routes. Tests: renderer legal.test.mjs, ui renderLegalHtml unit, landing footer e2e.
34 lines
1.6 KiB
Docker
34 lines
1.6 KiB
Docker
# renderer — the finished-game image-render sidecar: Node + skia-canvas running the SAME
|
|
# ui/src/lib/gameimage.ts the web client unit-tests, bundled at build time (renderer/README.md).
|
|
# Debian slim, not the repo's usual alpine/distroless: skia-canvas ships prebuilt glibc
|
|
# binaries and resolves fonts through fontconfig, and the runtime fonts are baked into the
|
|
# image — Liberation Sans (the UI font stack's Linux face) + Noto Color Emoji (the 🏆).
|
|
FROM node:22-slim AS build
|
|
WORKDIR /src/renderer
|
|
RUN corepack enable && corepack prepare pnpm@11.0.9 --activate
|
|
COPY renderer/package.json renderer/pnpm-lock.yaml renderer/pnpm-workspace.yaml ./
|
|
RUN pnpm install --frozen-lockfile
|
|
COPY renderer/build.mjs ./
|
|
COPY renderer/src ./src
|
|
COPY ui/src/lib /src/ui/src/lib
|
|
RUN pnpm run bundle
|
|
|
|
FROM node:22-slim
|
|
RUN apt-get update \
|
|
&& apt-get install -y --no-install-recommends fonts-liberation fonts-noto-color-emoji \
|
|
&& rm -rf /var/lib/apt/lists/*
|
|
ENV NODE_ENV=production
|
|
ARG VERSION=dev
|
|
ENV APP_VERSION=${VERSION}
|
|
WORKDIR /app
|
|
COPY --from=build /src/renderer/node_modules ./node_modules
|
|
COPY --from=build /src/renderer/dist ./dist
|
|
COPY renderer/src/server.mjs renderer/src/render.mjs renderer/src/offer.mjs renderer/src/legal.mjs ./src/
|
|
# The public legal pages: the owner-edited markdown, read once at boot. GET /offer/ also splices in
|
|
# the live price list fetched from the backend at request time; GET /privacy/ and GET /eula/ are
|
|
# static (no dynamic data).
|
|
COPY ui/legal/offer_ru.md ui/legal/privacy_ru.md ui/legal/eula_ru.md ./legal/
|
|
USER node
|
|
EXPOSE 8090
|
|
CMD ["node", "src/server.mjs"]
|