| FROM ghcr.io/open-webui/open-webui:v0.6.20 | |
| RUN apt-get update && apt-get install -y python3 python3-pip curl | |
| RUN pip3 install --no-cache-dir webdavclient3 requests | |
| COPY sync_data.sh sync_data.sh | |
| # 在</head>标签前添加custom.css引用 | |
| RUN sed -i 's|</head>|<link rel="stylesheet" href="https://owubuti.netlify.app/custom.css"></head>|' /app/build/index.html && \ | |
| sed -i 's|</body>|<script src="https://owubuti.netlify.app/custom.js"></script></body>|' /app/build/index.html && \ | |
| sed -i 's|</head>|<link rel="stylesheet" href="https://owubuti.netlify.app/editor.css"></head>|' /app/build/index.html && \ | |
| sed -i 's|</body>|<script src="https://owubuti.netlify.app/editor.js"></script></body>|' /app/build/index.html | |
| RUN chmod -R 777 ./data && \ | |
| chmod -R 777 /app/backend/open_webui && \ | |
| chmod +x sync_data.sh && \ | |
| sed -i "1r sync_data.sh" ./start.sh | |
| # sed -i "1r sync_data.sh" ./start.sh && \ | |
| # sed -i '1i exec > /dev/null 2>&1' ./start.sh | |