From f4104e4366afa2f5ca15d996b9b582ab36c235a1 Mon Sep 17 00:00:00 2001 From: Mackie Date: Fri, 22 May 2026 23:11:12 +0800 Subject: [PATCH] docker --- Dockerfile | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/Dockerfile b/Dockerfile index 1642757..0508c35 100644 --- a/Dockerfile +++ b/Dockerfile @@ -16,15 +16,13 @@ COPY . . ENV NEXT_TELEMETRY_DISABLED=1 ENV NODE_ENV=production -ARG DATABASE_URI -ARG PAYLOAD_SECRET -ARG NEXT_PUBLIC_SERVER_URL -ENV DATABASE_URI=$DATABASE_URI -ENV PAYLOAD_SECRET=$PAYLOAD_SECRET -ENV NEXT_PUBLIC_SERVER_URL=$NEXT_PUBLIC_SERVER_URL +# Dummy values for build time (overridden at runtime by Dokploy env vars) +ENV DATABASE_URI=mongodb://localhost:27017/build-placeholder +ENV PAYLOAD_SECRET=build-time-placeholder +ENV NEXT_PUBLIC_SERVER_URL=http://localhost:3002 RUN pnpm payload generate:types || echo "Skipped" -RUN pnpm next build +RUN pnpm next build --experimental-build-mode compile FROM base AS runner WORKDIR /app @@ -45,4 +43,4 @@ EXPOSE 3002 ENV PORT=3002 ENV HOSTNAME=0.0.0.0 -CMD ["node", "server.js"] \ No newline at end of file +CMD ["node", "server.js"]