Spaces:
Sleeping
Sleeping
Update Dockerfile
Browse files- Dockerfile +17 -19
Dockerfile
CHANGED
@@ -1,28 +1,26 @@
|
|
1 |
-
|
|
|
2 |
|
3 |
-
#
|
4 |
-
|
5 |
-
|
6 |
-
# Clone the repo
|
7 |
-
RUN git clone https://github.com/viratxd/prompt-glow-lab-00.git /usr/src/app
|
8 |
|
9 |
-
#
|
10 |
-
RUN
|
11 |
|
12 |
-
#
|
13 |
-
RUN
|
14 |
|
15 |
-
#
|
16 |
-
|
17 |
|
18 |
-
#
|
19 |
-
|
20 |
|
21 |
-
# Install
|
22 |
-
RUN npm install -g
|
23 |
|
24 |
-
# Expose
|
25 |
EXPOSE 7860
|
26 |
|
27 |
-
#
|
28 |
-
CMD ["
|
|
|
1 |
+
# Use Alpine Node.js image
|
2 |
+
FROM node:20-alpine
|
3 |
|
4 |
+
# Set working directory
|
5 |
+
WORKDIR /app
|
|
|
|
|
|
|
6 |
|
7 |
+
# Install git (needed to clone repo)
|
8 |
+
RUN apk add --no-cache git
|
9 |
|
10 |
+
# Clone your Vite.js app from GitHub
|
11 |
+
RUN git clone https://github.com/viratxd/prompt-glow-lab-00.git ./
|
12 |
|
13 |
+
# Install dependencies
|
14 |
+
RUN npm install
|
15 |
|
16 |
+
# Build Vite app
|
17 |
+
RUN npm run build
|
18 |
|
19 |
+
# Install a small static server to serve `dist/`
|
20 |
+
RUN npm install -g serve
|
21 |
|
22 |
+
# Expose port
|
23 |
EXPOSE 7860
|
24 |
|
25 |
+
# Serve the built Vite app
|
26 |
+
CMD ["serve", "-s", "dist", "-l", "7860"]
|