Spaces:
Running
Running
Florin Bobiș
commited on
Commit
•
c547da1
1
Parent(s):
bf4b64d
docker
Browse files- Dockerfile +23 -0
Dockerfile
ADDED
@@ -0,0 +1,23 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# Use an official Node.js runtime as the base image
|
2 |
+
FROM node:18-alpine
|
3 |
+
|
4 |
+
# Set the working directory in the container
|
5 |
+
WORKDIR /app
|
6 |
+
|
7 |
+
# Copy package.json and package-lock.json to the working directory
|
8 |
+
COPY package*.json ./
|
9 |
+
|
10 |
+
# Install project dependencies
|
11 |
+
RUN npm install
|
12 |
+
|
13 |
+
# Copy all source files to the working directory
|
14 |
+
COPY . .
|
15 |
+
|
16 |
+
# Build the Next.js application
|
17 |
+
RUN npm run build
|
18 |
+
|
19 |
+
# Expose the port your app runs on
|
20 |
+
EXPOSE 7860
|
21 |
+
|
22 |
+
# Define the command to run your app
|
23 |
+
CMD [ "npm", "start" ]
|