mirror of
https://github.com/luxfi/safe-wallet.git
synced 2026-10-30 15:19:21 +00:00
Zoo, Pars and Hanzo were rendering a rounded rectangle. Their real artwork existed the whole time — the CMYK circles, the Persian star, the block H — just not here. Each now comes from that brand's own logo package at build time, the way Lux already did, so nobody is holding a second copy of anyone else's letterforms. A mark drawn in currentColor has no colour of its own, and an SVG loaded as an image is its own document with nothing to inherit from, so the Hanzo mark carries its own light and dark ink. The colour marks keep theirs in both. The NEXT_PUBLIC_BRAND_* vars went with it. Nothing had read them since the brand started resolving from the request host, but .env.hanzo still named safe-client.safe.global as the gateway and black as the primary colour, both of which the brand package contradicts, and select-brand.sh would have copied either into a build. .env.safe could no longer produce the upstream build it promised. Both files were dead through and every line, so they are gone rather than emptied, along with the two build scripts that read them. One build remains; the host decides the brand.
41 lines
1.8 KiB
Docker
41 lines
1.8 KiB
Docker
# Lux Safe — production image for ghcr.io/luxfi/lux-safe.
|
|
#
|
|
# Builds the `@safe-global/web` static export with the `lux` brand at BUILD
|
|
# time (not at container start), then serves the static `out/` directory.
|
|
# Node pinned to the repo .nvmrc (v24).
|
|
#
|
|
# The Lux chain list + Safe state come from the Lux CGW at runtime; the brand
|
|
# env (apps/web/.env.lux) pins NEXT_PUBLIC_GATEWAY_URL_PRODUCTION at the Lux
|
|
# gateway and sets NEXT_PUBLIC_IS_PRODUCTION=true.
|
|
|
|
# ---- build ---------------------------------------------------------------
|
|
FROM node:24-alpine AS build
|
|
RUN apk add --no-cache libc6-compat git python3 py3-pip make g++ libusb-dev eudev-dev linux-headers bash
|
|
WORKDIR /app
|
|
COPY . .
|
|
RUN corepack enable && yarn config set httpTimeout 600000
|
|
RUN yarn install --immutable
|
|
# after-install = generate-types (typechain ethers-v6 contract types the build
|
|
# imports). Defined in apps/web, so invoke it workspace-scoped from the root.
|
|
RUN yarn workspace @safe-global/web after-install
|
|
ENV NODE_ENV=production
|
|
ENV NEXT_TELEMETRY_DISABLED=1
|
|
ENV NODE_OPTIONS=--max-old-space-size=8192
|
|
# Copy .env.lux -> .env.local, export it so the build-time fetch-chains hits
|
|
# the Lux CGW, then build the static export. `next build` itself also loads
|
|
# .env.local. Every brand's assets ship in the one image; the host picks.
|
|
RUN bash scripts/select-brand.sh lux \
|
|
&& set -a && . apps/web/.env.local && set +a \
|
|
&& yarn workspace @safe-global/web build
|
|
|
|
# ---- serve ---------------------------------------------------------------
|
|
FROM node:24-alpine AS serve
|
|
RUN apk add --no-cache ca-certificates && npm i -g serve@14
|
|
WORKDIR /app
|
|
COPY --from=build /app/apps/web/out ./out
|
|
ENV PORT=3000
|
|
EXPOSE 3000
|
|
# Static multi-page export: `serve` clean-URLs map /balances -> balances.html.
|
|
# (No `-s`: that would rewrite every route to index.html and break the pages.)
|
|
CMD ["serve", "out", "-l", "3000"]
|