Files
TBNilles 44f7b5a697 feat(comfyuimini): add "Manage Photos" sidebar link to the Gallery
ComfyUIMini's built-in gallery is view-only. Inject a "Manage Photos"
link into its sidebar (via the shared head.ejs partial at build time, so
no fork) that points to the Model Manager's delete-capable Gallery. The
URL is built client-side from the browser host; the port is baked from
the MODEL_MANAGER_PORT build arg (default 8189).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-07 15:46:04 -04:00

50 lines
1.5 KiB
Docker

# ComfyUIMini - Mobile-friendly UI for ComfyUI
# Lightweight Node.js container that proxies to ComfyUI
FROM node:20-alpine
LABEL maintainer="SparkyUI"
LABEL description="ComfyUIMini mobile UI for ComfyUI on DGX Spark"
WORKDIR /app
# Install git for cloning, then clean up
RUN apk add --no-cache git
# Clone ComfyUIMini
ARG COMFYUIMINI_REF=main
RUN git clone https://github.com/ImDarkTom/ComfyUIMini.git . && \
git checkout ${COMFYUIMINI_REF}
# Install all deps, build TypeScript, then prune dev dependencies
RUN npm ci && \
npm run build && \
npm prune --omit=dev
# SparkyUI: add a "Manage Photos" sidebar link to the Model Manager gallery.
# Appended to the head partial (included on every page) so we don't fork ComfyUIMini.
ARG MODEL_MANAGER_PORT=8189
COPY sparky-sidebar.html /tmp/sparky-sidebar.html
RUN sed "s/__MM_PORT__/${MODEL_MANAGER_PORT}/g" /tmp/sparky-sidebar.html \
>> src/server/views/partials/head.ejs
# Create config directory and default config
# Config is overridden at runtime via NODE_CONFIG env var
RUN mkdir -p config && \
cp config/default.example.json config/default.json
# Create directories for workflows and ensure proper permissions
RUN mkdir -p workflows && \
chown -R node:node /app
# Switch to non-root user
USER node
EXPOSE 3000
# Health check - verify the server responds
HEALTHCHECK --interval=30s --timeout=10s --start-period=10s --retries=3 \
CMD wget --no-verbose --tries=1 --spider http://localhost:3000/ || exit 1
# Project uses tsx to run TypeScript directly (not compiled to dist/)
CMD ["npm", "start"]