Hanzo Dev commited on
Commit
d675ae7
·
1 Parent(s): 46bed43

Simplify Docker startup

Browse files
Files changed (2) hide show
  1. Dockerfile +7 -10
  2. next.config.js +0 -1
Dockerfile CHANGED
@@ -2,20 +2,17 @@ FROM node:20-slim
2
 
3
  WORKDIR /app
4
 
5
- # Copy only package files first for better caching
6
- COPY package*.json ./
7
 
8
- # Install dependencies with legacy peer deps
9
  RUN npm ci --legacy-peer-deps
10
 
11
- # Copy the rest of the application
12
- COPY . .
13
-
14
- # Build the Next.js app
15
  RUN npm run build
16
 
17
- # Expose the port
18
  EXPOSE 3000
19
 
20
- # Use Node directly to avoid npm overhead
21
- CMD ["node", ".next/standalone/server.js"]
 
2
 
3
  WORKDIR /app
4
 
5
+ # Copy everything
6
+ COPY . .
7
 
8
+ # Install dependencies
9
  RUN npm ci --legacy-peer-deps
10
 
11
+ # Build the app
 
 
 
12
  RUN npm run build
13
 
14
+ # Expose port
15
  EXPOSE 3000
16
 
17
+ # Start with npm start
18
+ CMD ["npm", "start"]
next.config.js CHANGED
@@ -1,6 +1,5 @@
1
  /** @type {import('next').NextConfig} */
2
  const nextConfig = {
3
- output: 'standalone',
4
  reactStrictMode: true,
5
  swcMinify: true,
6
  }
 
1
  /** @type {import('next').NextConfig} */
2
  const nextConfig = {
 
3
  reactStrictMode: true,
4
  swcMinify: true,
5
  }