Spaces:
Runtime error
Runtime error
Hanzo Dev
commited on
Commit
·
d675ae7
1
Parent(s):
46bed43
Simplify Docker startup
Browse files- Dockerfile +7 -10
- next.config.js +0 -1
Dockerfile
CHANGED
|
@@ -2,20 +2,17 @@ FROM node:20-slim
|
|
| 2 |
|
| 3 |
WORKDIR /app
|
| 4 |
|
| 5 |
-
# Copy
|
| 6 |
-
COPY
|
| 7 |
|
| 8 |
-
# Install dependencies
|
| 9 |
RUN npm ci --legacy-peer-deps
|
| 10 |
|
| 11 |
-
#
|
| 12 |
-
COPY . .
|
| 13 |
-
|
| 14 |
-
# Build the Next.js app
|
| 15 |
RUN npm run build
|
| 16 |
|
| 17 |
-
# Expose
|
| 18 |
EXPOSE 3000
|
| 19 |
|
| 20 |
-
#
|
| 21 |
-
CMD ["
|
|
|
|
| 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 |
}
|