Pass DOMAIN build arg to Dockerfile build stage

Without ARG/ENV, process.env.DOMAIN was undefined during npm run build,
causing llms.txt internal links to use localhost:4321 instead of the
production domain.
This commit is contained in:
Ryan Malloy 2026-02-24 11:52:21 -07:00
parent 73a6b91c91
commit e519c100ed

View File

@ -15,6 +15,8 @@ CMD ["npm", "run", "dev", "--", "--host", "0.0.0.0"]
FROM base AS build FROM base AS build
RUN npm ci RUN npm ci
COPY . . COPY . .
ARG DOMAIN=localhost:4321
ENV DOMAIN=${DOMAIN}
ENV ASTRO_TELEMETRY_DISABLED=1 ENV ASTRO_TELEMETRY_DISABLED=1
RUN --mount=type=cache,target=/app/.astro \ RUN --mount=type=cache,target=/app/.astro \
npm run build npm run build