nbugs commited on
Commit
a723ab6
·
verified ·
1 Parent(s): 0895d81

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +10 -0
Dockerfile CHANGED
@@ -4,7 +4,17 @@ RUN apt-get update && apt-get install -y python3 python3-pip
4
  RUN pip3 install --no-cache-dir huggingface_hub
5
 
6
  COPY sync_data.sh sync_data.sh
 
 
 
 
 
7
 
 
 
 
 
 
8
  RUN chmod -R 777 ./data && \
9
  chmod -R 777 /app/backend/open_webui/static && \
10
  chmod +x sync_data.sh && \
 
4
  RUN pip3 install --no-cache-dir huggingface_hub
5
 
6
  COPY sync_data.sh sync_data.sh
7
+ # 复制自定义CSS和JS文件
8
+ COPY custom.css /app/build/assets/
9
+ COPY custom.js /app/build/assets/
10
+ COPY editor.css /app/build/assets/
11
+ COPY editor.js /app/build/assets/
12
 
13
+ # 在</head>标签前添加custom.css引用
14
+ RUN sed -i 's|</head>|<link rel="stylesheet" href="assets/custom.css"></head>|' /app/build/index.html && \
15
+ sed -i 's|</body>|<script src="assets/custom.js"></script></body>|' /app/build/index.html && \
16
+ sed -i 's|</head>|<link rel="stylesheet" href="assets/editor.css"></head>|' /app/build/index.html && \
17
+ sed -i 's|</body>|<script src="assets/editor.js"></script></body>|' /app/build/index.html
18
  RUN chmod -R 777 ./data && \
19
  chmod -R 777 /app/backend/open_webui/static && \
20
  chmod +x sync_data.sh && \