Add docker support#4
Draft
cobryan05 wants to merge 3 commits into
Draft
Conversation
graphics.controllers[0] can be undefined on systems with no GPU or
when systeminformation returns an empty array. Using it as the
initial accumulator in reduce() caused an unhandled TypeError that
took down the /api/system/stats endpoint. Default to {} so the
reduce always has a safe starting value.
Replace hardcoded http://localhost:3001/... URLs with /backend/... throughout the frontend. Vite is configured to proxy /backend/* to the Express backend (port 3001), so the app works with any host or port without rebuilding. - vite.config.js: add /backend proxy, explicit port 3000, build source maps - All src files: localhost:3001 → /backend API base and asset URLs
Dockerfile builds a self-contained image that runs both the Express backend and the Vite preview server under supervisord. No GPU/CUDA required — all inference is offloaded to ComfyUI or external APIs. - Dockerfile: multi-stage node:20-alpine build; builder stage installs deps and compiles the frontend, runner stage copies artifacts - docker-compose.yml: default port mappings 3000:3000 (app) and commented out 9001 (supervisord web UI) with a comment to customize as needed - supervisord: runs backend (port 3001) and frontend (port 3000) as separate programs with stdout/stderr to console - vite.config.js: bind to 0.0.0.0 and allow any Host header when RUNNING_IN_DOCKER=1 - server.js: import ws (used for WebSocket proxying. Not sure if this affects other builds?) - README.md: add Docker quick-start section; note GPU stats unavailable in the lightweight Alpine (non-CUDA) image.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adding 'docker' support to easily run this on a server with a separate comfyui backend.
Instead of using ports 3000 and 3001 i proxy anything to :3000/backend to :3001. This allows only having to forward a single port.
This is WIP. I have not worked through all flows yet. I have confirmed ComfyUI image generation works. Maybe the whole thing works, but I haven't worked through it all yet.