Rewrite Dockerfile: copy custom.css/js and edit source index.html

This commit is contained in:
Nathan Schneider committed 2026-10-18 21:26:25 -06:00
1 parent 6f4cd027db
commit 58b3603880
1 file changed
+5 -7
+5 -7
View File
@@ -29,12 +29,10 @@ COPY assets/apple-touch-icon-180x180.png /app/code/librechat/client/dist/assets/
COPY assets/icon-192x192.png /app/code/librechat/client/dist/assets/icon-192x192.png
COPY assets/maskable-icon.png /app/code/librechat/client/dist/assets/maskable-icon.png
# Copy custom branding CSS
# Custom stylesheet and optional helper JS
COPY assets/custom.css /app/code/librechat/client/dist/assets/custom.css
# Copy optional helper JS (auto‑load API key)
COPY assets/custom.js /app/code/librechat/client/dist/assets/custom.js
# Apply branding patch to the *source* index.html before the container copies it
COPY client/index.html.patch /tmp/index.html.patch
RUN cd /app/code/librechat/client && \
patch -p0 < /tmp/index.html.patch && \
rm /tmp/index.html.patch
# Inject branding into source index.html (before runtime copy)
RUN sed -i 's|<title>LibreChat</title>|<title>Inference Co-op</title>|' /app/code/librechat/client/index.html && \
sed -i '/<title>Inference Co-op<\/title>/a <link rel="stylesheet" href="assets/custom.css">' /app/code/librechat/client/index.html