- Linktree-style homepage with photo, social links, and self-hosted services (container registry, Git server) - Registry pages rendered on demand from Harbor via a live content collection, cached in memory (60s fresh, 10min stale-while-revalidate) - Pinned registry images (PINNED_IMAGES) shown first with a star - Node standalone server with security headers; self-contained server build so the Docker image ships no node_modules - Gitea workflow building multi-arch images for Flux Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
+24
@@ -0,0 +1,24 @@
|
||||
# syntax=docker/dockerfile:1.10
|
||||
|
||||
# The build output is platform-independent, so build natively (no QEMU) for multi-arch images.
|
||||
FROM --platform=$BUILDPLATFORM node:22-alpine AS build
|
||||
WORKDIR /app
|
||||
RUN corepack enable
|
||||
ENV ASTRO_TELEMETRY_DISABLED=1
|
||||
COPY package.json pnpm-lock.yaml pnpm-workspace.yaml ./
|
||||
RUN --mount=type=cache,id=pnpm,target=/root/.local/share/pnpm/store \
|
||||
pnpm install --frozen-lockfile
|
||||
COPY . .
|
||||
# Only the canonical site URL is baked in; Harbor settings are read at runtime.
|
||||
ARG SITE_URL
|
||||
RUN pnpm build
|
||||
|
||||
FROM node:22-alpine
|
||||
WORKDIR /app
|
||||
ENV NODE_ENV=production HOST=0.0.0.0 PORT=8080
|
||||
# The server build is self-contained (see `vite.ssr.noExternal`), so no node_modules.
|
||||
COPY --from=build /app/dist ./dist
|
||||
COPY package.json server.mjs ./
|
||||
USER node
|
||||
EXPOSE 8080
|
||||
CMD ["node", "server.mjs"]
|
||||
Reference in New Issue
Block a user