This commit is contained in:
oiov
2025-05-25 20:59:10 +08:00
parent 1e713ea613
commit 01b80eaf9e
4 changed files with 19 additions and 4 deletions
+16 -3
View File
@@ -1,12 +1,18 @@
FROM node:20-alpine AS base
FROM node:22-alpine AS base
FROM base AS deps
RUN apk update && apk upgrade
RUN apk add --no-cache openssl3-compat
RUN apk add --no-cache libc6-compat
WORKDIR /app
RUN npm install -g pnpm
COPY package.json yarn.lock* package-lock.json* pnpm-lock.yaml* .npmrc* ./
# COPY package.json yarn.lock* package-lock.json* pnpm-lock.yaml* .npmrc* ./
# 复制根目录下的所有文件
COPY . .
RUN pnpm config set registry https://registry.npmmirror.com
@@ -14,15 +20,21 @@ COPY prisma ./prisma
COPY package.json pnpm-lock.yaml* .npmrc* ./
RUN pnpm i --frozen-lockfile
# RUN pnpm postinstall
FROM base AS builder
WORKDIR /app
RUN npm install -g pnpm
ARG NEXT_PUBLIC_APP_URL="http://localhost:3000"
ARG RESEND_API_KEY="re_123"
ARG RESEND_API_KEY="re_your_resend_api_key"
ARG DATABASE_URL="postgres://postgres:postgres@postgres:5432/wrdo"
ENV NEXT_PUBLIC_APP_URL=$NEXT_PUBLIC_APP_URL
ENV RESEND_API_KEY=$RESEND_API_KEY
ENV DATABASE_URL=$DATABASE_URL
COPY --from=deps /app/node_modules ./node_modules
COPY . .
@@ -37,6 +49,7 @@ ENV NODE_ENV=production
ENV IS_DOCKER=true
COPY --from=builder /app/public ./public
COPY --from=builder /app/prisma ./prisma
# Automatically leverage output traces to reduce image size
# https://nextjs.org/docs/advanced-features/output-file-tracing
+1
View File
@@ -22,6 +22,7 @@ export const {
handlers: { GET, POST },
auth,
} = NextAuth({
trustHost: true,
adapter: PrismaAdapter(prisma),
session: { strategy: "jwt" },
pages: {
+1
View File
@@ -3,6 +3,7 @@
generator client {
provider = "prisma-client-js"
// binaryTargets = ["native", "linux-musl-arm64-openssl-3.0.x", "linux-musl-arm64-openssl-1.1.x"]
}
datasource db {
+1 -1
View File
File diff suppressed because one or more lines are too long