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