Spaces:
Sleeping
Sleeping
Create Dockerfile
Browse files- Dockerfile +29 -0
Dockerfile
ADDED
@@ -0,0 +1,29 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# Use Node.js 18 as the base image (compatible with Next.js 15)
|
2 |
+
FROM node:18-slim
|
3 |
+
|
4 |
+
# Install required system dependencies
|
5 |
+
RUN apt-get update && apt-get install -y \
|
6 |
+
build-essential \
|
7 |
+
&& rm -rf /var/lib/apt/lists/*
|
8 |
+
|
9 |
+
# Set working directory
|
10 |
+
WORKDIR /app
|
11 |
+
|
12 |
+
# Copy package files
|
13 |
+
COPY package*.json ./
|
14 |
+
|
15 |
+
# Install dependencies
|
16 |
+
RUN npm install
|
17 |
+
|
18 |
+
# Copy the rest of the application
|
19 |
+
COPY . .
|
20 |
+
|
21 |
+
# Build the Next.js application
|
22 |
+
# Note: We don't use turbopack for production builds
|
23 |
+
RUN npm run build
|
24 |
+
|
25 |
+
# Expose the port the app runs on
|
26 |
+
EXPOSE 3000
|
27 |
+
|
28 |
+
# Start the application
|
29 |
+
CMD ["npm", "start"]
|