Skip to content

Add docker support#4

Draft
cobryan05 wants to merge 3 commits into
visualbruno:mainfrom
cobryan05:add-docker-support
Draft

Add docker support#4
cobryan05 wants to merge 3 commits into
visualbruno:mainfrom
cobryan05:add-docker-support

Conversation

@cobryan05
Copy link
Copy Markdown

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.

cobryan05 added 3 commits May 24, 2026 10:42
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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant