Typecheck
CI / ci (push) Canceled after 0s

This commit is contained in:
Stefan Lazic committed 2026-10-07 16:54:08 +01:00
1 parent 1442d33d55
commit a530d00aa2
2 files changed
+14

No files matched your search

+8
View File
@@ -43,6 +43,14 @@ ENV DATABASE_PORT="3306"
ENV DATABASE_NAME="build" ENV DATABASE_NAME="build"
ENV DATABASE_USER="build" ENV DATABASE_USER="build"
ENV DATABASE_PASSWORD="build" ENV DATABASE_PASSWORD="build"
# Skip `next build`'s TypeScript pass in the image. It's a redundant second
# check — `npx tsc --noEmit` already gates every change before it's built —
# and it's by far the heaviest step of the build: on a low-memory VPS it can
# swap for many minutes or get OOM-killed (exit 137). Type errors are still
# caught everywhere else; to type-check inside the image anyway, build with
# `docker build --build-arg SKIP_TYPECHECK=false .`
ARG SKIP_TYPECHECK=true
ENV SKIP_TYPECHECK=$SKIP_TYPECHECK
RUN npm run build RUN npm run build
FROM node:22-alpine AS runner FROM node:22-alpine AS runner
+6
View File
@@ -25,6 +25,12 @@ const SECURITY_HEADERS = [
const nextConfig: NextConfig = { const nextConfig: NextConfig = {
reactStrictMode: true, reactStrictMode: true,
// Opt-in only (set by the Dockerfile, see its comment): `next build`
// normally runs a full TypeScript check, which on a small server can
// need more memory than is free and turn a build into a swap-thrashing
// crawl. Left unset everywhere else, so `npm run build` and CI still
// fail on a type error.
typescript: { ignoreBuildErrors: process.env.SKIP_TYPECHECK === "true" },
experimental: { experimental: {
// Next's Server Action default (1MB) is too small for the PWA // Next's Server Action default (1MB) is too small for the PWA
// icon/splash-screen ZIP import (see updateAppIconSettingsAction's // icon/splash-screen ZIP import (see updateAppIconSettingsAction's