Update Dockerfile
Browse files- Dockerfile +12 -6
Dockerfile
CHANGED
@@ -1,6 +1,9 @@
|
|
1 |
FROM node:18
|
2 |
|
3 |
-
#
|
|
|
|
|
|
|
4 |
RUN git clone https://github.com/lezzthanthree/SEKAI-Stories.git /app
|
5 |
|
6 |
WORKDIR /app
|
@@ -8,11 +11,14 @@ WORKDIR /app
|
|
8 |
# Install dependencies
|
9 |
RUN npm install
|
10 |
|
11 |
-
#
|
12 |
-
|
|
|
|
|
|
|
13 |
|
14 |
-
#
|
15 |
EXPOSE 7860
|
16 |
|
17 |
-
#
|
18 |
-
CMD ["
|
|
|
1 |
FROM node:18
|
2 |
|
3 |
+
# Install git
|
4 |
+
RUN apt-get update && apt-get install -y git
|
5 |
+
|
6 |
+
# Clone the repository
|
7 |
RUN git clone https://github.com/lezzthanthree/SEKAI-Stories.git /app
|
8 |
|
9 |
WORKDIR /app
|
|
|
11 |
# Install dependencies
|
12 |
RUN npm install
|
13 |
|
14 |
+
# Build the project
|
15 |
+
RUN npm run build
|
16 |
+
|
17 |
+
# Install a simple static file server
|
18 |
+
RUN npm install -g serve
|
19 |
|
20 |
+
# Expose the port
|
21 |
EXPOSE 7860
|
22 |
|
23 |
+
# Serve the static files
|
24 |
+
CMD ["serve", "-s", "dist", "-l", "7860"]
|