mirror of
https://github.com/andwati/andwati.com.git
synced 2026-10-18 09:22:53 +00:00
- Fresh structure: Next.js App Router + Tailwind v4 at the repo root, exported as static files (output: export) and served by static-web-server - Remove the Strapi CMS, Astro app, Pagefind search, comments, old scripts, Lighthouse config and compose files; content in content/ is now plain markdown with YAML frontmatter - Pages: About, Writing, Reading (3D bookshelf) and Portfolio, styled after adammaj.com - SEO: metadata and canonicals, JSON-LD, generated OG images, sitemap, robots, RSS and JSON feeds, llms.txt - Umami via PUBLIC_UMAMI_SCRIPT_URL / PUBLIC_UMAMI_WEBSITE_ID (build args) - Dockerfile builds the export and serves it with sws.toml (security headers, clean URLs, .well-known, OG image content type, immutable asset caching) - Prettier and cspell for content with a husky/lint-staged pre-commit hook - Old redirect list dropped to start from a clean slate
31 lines
1.0 KiB
Docker
31 lines
1.0 KiB
Docker
# syntax=docker/dockerfile:1
|
|
# Static site: build with Next (output: export), serve with static-web-server.
|
|
# docker build -t andwati-site \
|
|
# --build-arg PUBLIC_UMAMI_SCRIPT_URL=... --build-arg PUBLIC_UMAMI_WEBSITE_ID=... .
|
|
|
|
FROM node:24-alpine AS deps
|
|
ENV PNPM_HOME=/pnpm PATH=/pnpm:$PATH
|
|
RUN corepack enable
|
|
WORKDIR /app
|
|
COPY package.json pnpm-lock.yaml pnpm-workspace.yaml ./
|
|
RUN --mount=type=cache,id=pnpm,target=/pnpm/store \
|
|
pnpm install --frozen-lockfile
|
|
|
|
FROM node:24-alpine AS build
|
|
ENV PNPM_HOME=/pnpm PATH=/pnpm:$PATH NEXT_TELEMETRY_DISABLED=1
|
|
RUN corepack enable
|
|
WORKDIR /app
|
|
COPY --from=deps /app/node_modules ./node_modules
|
|
COPY . .
|
|
# Umami is read at build time (pages are prerendered), so pass these as build args.
|
|
ARG PUBLIC_UMAMI_SCRIPT_URL
|
|
ARG PUBLIC_UMAMI_WEBSITE_ID
|
|
ENV PUBLIC_UMAMI_SCRIPT_URL=$PUBLIC_UMAMI_SCRIPT_URL \
|
|
PUBLIC_UMAMI_WEBSITE_ID=$PUBLIC_UMAMI_WEBSITE_ID
|
|
RUN pnpm build
|
|
|
|
FROM ghcr.io/static-web-server/static-web-server:2
|
|
COPY --from=build /app/out /public
|
|
COPY sws.toml /sws.toml
|
|
EXPOSE 80
|