Update Dockerfile
Browse files- Dockerfile +13 -8
Dockerfile
CHANGED
@@ -1,16 +1,21 @@
|
|
1 |
-
# Use the official Node.js image as the base image
|
2 |
FROM node:20.4
|
3 |
|
4 |
-
# Set the working directory in the container
|
5 |
WORKDIR /app
|
6 |
|
|
|
7 |
RUN --mount=type=secret,id=CLONE,mode=0444,required=true \
|
8 |
-
|
9 |
-
|
10 |
-
RUN chown -R node:node ./* && \
|
11 |
chmod u+x ./* && \
|
12 |
-
|
|
|
|
|
|
|
|
|
13 |
RUN npm install
|
14 |
|
15 |
-
#
|
16 |
-
|
|
|
|
|
|
|
|
|
|
1 |
FROM node:20.4
|
2 |
|
|
|
3 |
WORKDIR /app
|
4 |
|
5 |
+
# Clone repository và đảm bảo quyền truy cập đầy đủ
|
6 |
RUN --mount=type=secret,id=CLONE,mode=0444,required=true \
|
7 |
+
git clone https://github.com/tutoihoc/SillyTavern.git . && \
|
8 |
+
chown -R node:node ./* && \
|
|
|
9 |
chmod u+x ./* && \
|
10 |
+
mkdir -p /app/dist && \
|
11 |
+
chown -R node:node /app/dist && \
|
12 |
+
chmod -R 777 /app/dist
|
13 |
+
|
14 |
+
# Cài đặt các phụ thuộc
|
15 |
RUN npm install
|
16 |
|
17 |
+
# Nếu cần, chạy build để tạo các tệp như lib.js
|
18 |
+
RUN npm run build
|
19 |
+
|
20 |
+
# Khởi động ứng dụng
|
21 |
+
CMD ["node", "server.js"]
|