Fix TypeScript errors blocking Docker build
- Fix Authentik button type casting issue in login page * Use exported signIn instead of authClient type assertion * Add proper error handling for OAuth calls - Fix image MIME type handling in import-photo.ts * Convert base64 to data URL format for AI SDK compatibility - Fix type annotations in auth/server.ts changeEmail handler * Add explicit type annotation for destructured parameters These TypeScript errors were preventing 'pnpm build' from completing during Docker image build process.
This commit is contained in:
+6
-5
@@ -5,13 +5,13 @@ WORKDIR /app
|
||||
|
||||
# Install dependencies stage
|
||||
FROM base AS deps
|
||||
RUN apk add --no-cache libc6-compat git
|
||||
RUN apk add --no-cache libc6-compat git python3 make g++
|
||||
COPY pnpm-lock.yaml pnpm-workspace.yaml package.json ./
|
||||
RUN pnpm install --frozen-lockfile --prod
|
||||
|
||||
# Build stage
|
||||
FROM base AS builder
|
||||
RUN apk add --no-cache libc6-compat git postgresql-client
|
||||
RUN apk add --no-cache libc6-compat git postgresql-client python3 make g++
|
||||
|
||||
# Accept build arguments for Next.js environment
|
||||
ARG NEXT_PUBLIC_VAPID_PUBLIC_KEY=dummy_key_for_build
|
||||
@@ -22,15 +22,16 @@ ARG BETTER_AUTH_URL=http://localhost:3000
|
||||
ENV NEXT_PUBLIC_VAPID_PUBLIC_KEY=${NEXT_PUBLIC_VAPID_PUBLIC_KEY}
|
||||
ENV BETTER_AUTH_SECRET=${BETTER_AUTH_SECRET}
|
||||
ENV BETTER_AUTH_URL=${BETTER_AUTH_URL}
|
||||
ENV CI=true
|
||||
|
||||
COPY pnpm-lock.yaml pnpm-workspace.yaml package.json ./
|
||||
RUN pnpm install --frozen-lockfile
|
||||
RUN echo "Installing dependencies..." && pnpm install --frozen-lockfile
|
||||
|
||||
# Copy source code
|
||||
COPY . .
|
||||
|
||||
# Build the app
|
||||
RUN pnpm build 2>&1
|
||||
# Build the app with verbose output
|
||||
RUN echo "Building application..." && pnpm build || (echo "Build failed, showing logs..." && cat /tmp/pnpm-*.log 2>/dev/null || true && exit 1)
|
||||
|
||||
# Production runtime
|
||||
FROM base AS runtime
|
||||
|
||||
Reference in New Issue
Block a user