Spaces:
Runtime error
Runtime error
Hanzo Dev commited on
Commit ·
d675ae7
1
Parent(s): 46bed43
Simplify Docker startup
Browse filesFiles changed (2)
- Dockerfile+7-10
- next.config.js-1
1 unmodified line234567891011121314151617181920211 unmodified lineWORKDIR /app# Copy only package files first for better cachingCOPY package*.json ./# Install dependencies with legacy peer depsRUN npm ci --legacy-peer-deps# Copy the rest of the applicationCOPY . .# Build the Next.js appRUN npm run build# Expose the portEXPOSE 3000# Use Node directly to avoid npm overheadCMD ["node", ".next/standalone/server.js"]1 unmodified line234567891011121314151617181 unmodified lineWORKDIR /app# Copy everythingCOPY . .# Install dependenciesRUN npm ci --legacy-peer-deps# Build the appRUN npm run build# Expose portEXPOSE 3000# Start with npm startCMD ["npm", "start"]
123456/** @type {import('next').NextConfig} */const nextConfig = {output: 'standalone',reactStrictMode: true,swcMinify: true,}12345/** @type {import('next').NextConfig} */const nextConfig = {reactStrictMode: true,swcMinify: true,}
Dockerfile+7-10
next.config.js-1