fix: revert to standard Docker build (standalone incompatible with SSR errors)
This commit is contained in:
parent
9d625a3a0a
commit
7995b65ebe
|
|
@ -25,10 +25,11 @@ FROM node:20-alpine AS runner
|
|||
WORKDIR /app
|
||||
ENV NODE_ENV=production
|
||||
|
||||
# Copy standalone server and dependencies
|
||||
COPY --from=builder /app/.next/standalone ./
|
||||
COPY --from=builder /app/.next/static ./.next/static
|
||||
# Copy Next.js build output and dependencies
|
||||
COPY --from=builder /app/.next ./.next
|
||||
COPY --from=builder /app/public ./public
|
||||
COPY --from=builder /app/package*.json ./
|
||||
COPY --from=builder /app/node_modules ./node_modules
|
||||
|
||||
# Set environment variables at runtime
|
||||
ENV NEXT_PUBLIC_API_URL=$NEXT_PUBLIC_API_URL
|
||||
|
|
@ -37,4 +38,4 @@ ENV NEXT_PUBLIC_GOOGLE_CLIENT_ID=$NEXT_PUBLIC_GOOGLE_CLIENT_ID
|
|||
ENV NEXT_PUBLIC_FACEBOOK_APP_ID=$NEXT_PUBLIC_FACEBOOK_APP_ID
|
||||
|
||||
EXPOSE 3000
|
||||
CMD ["node", "server.js"]
|
||||
CMD ["npm", "run", "start"]
|
||||
|
|
|
|||
|
|
@ -14,6 +14,8 @@ import { initFacebookSDK, loginWithFacebook } from "@/lib/facebook-sdk";
|
|||
import toast from "react-hot-toast";
|
||||
|
||||
export const dynamic = 'force-dynamic';
|
||||
export const dynamicParams = true;
|
||||
export const revalidate = 0;
|
||||
|
||||
export default function LoginPage() {
|
||||
const { login, googleLogin, facebookLogin } = useAuth();
|
||||
|
|
|
|||
|
|
@ -1,7 +1,6 @@
|
|||
/** @type {import('next').NextConfig} */
|
||||
const nextConfig = {
|
||||
reactStrictMode: true,
|
||||
output: 'standalone',
|
||||
env: {
|
||||
NEXT_PUBLIC_API_URL: process.env.NEXT_PUBLIC_API_URL,
|
||||
},
|
||||
|
|
@ -16,6 +15,8 @@ const nextConfig = {
|
|||
experimental: {
|
||||
missingSuspenseWithCSRBailout: false,
|
||||
},
|
||||
// Generate error pages instead of failing build on prerender errors
|
||||
staticPageGenerationTimeout: 120,
|
||||
};
|
||||
|
||||
module.exports = nextConfig;
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user