Skip to content

Docker and Docker compose deployment#2

Open
YogevBokobza wants to merge 16 commits intokoen01:spoolmanfrom
YogevBokobza:improvements
Open

Docker and Docker compose deployment#2
YogevBokobza wants to merge 16 commits intokoen01:spoolmanfrom
YogevBokobza:improvements

Conversation

@YogevBokobza
Copy link
Copy Markdown

No description provided.

@YogevBokobza
Copy link
Copy Markdown
Author

@koen01, can you review and merge to the upstream?

Copy link
Copy Markdown
Owner

@koen01 koen01 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the Docker support — great idea to add this! A few issues to address before merging:

Blocking

Config overwritten on every restart
The CMD writes config.json before starting the app. Since data/ is a mounted volume, any change made via the settings modal (adding a printer, changing Spoolman mode, etc.) gets wiped on every container restart. Recommend an entrypoint script that only writes the config if it doesn't already exist, or merges env vars into an existing config rather than replacing it.

sshpass not installed
SSH auto-linking won't work — the app logs [SSH] sshpass not found and silently skips. Needs apt-get install -y sshpass in the final image stage.

UI_PORT env var is ignored
ENV UI_PORT=8005 is set but CMD hardcodes --port 8005. Changing UI_PORT in the compose file has no effect. Should be --port $UI_PORT.

Smaller issues

Legacy printer_url key
The CMD writes "printer_url" (old single-string field). Multi-printer support now uses "printer_urls" (array). Works via migration for one printer, but users can't configure multiple printers via env vars this way.

TZ=Asia/Jerusalem hardcoded
Looks like a personal leftover. Should be ${TZ:-UTC} or removed from the example.

git installed but unused in builder
The builder stage installs git via apt but never runs it — the app is copied from the build context, not cloned. Safe to drop.

Fragile JSON generation via printf
If any env var contains quotes or special characters, the printf output will be invalid JSON. A small entrypoint shell script or a Python one-liner (python3 -c "import json, os; ...") would be more robust.

Healthcheck hits / instead of /api/health
/api/health is the dedicated health endpoint — cheaper and more reliable than fetching the full HTML page.

Empty env vars produce invalid JSON
If FILAMENT_DIAMETER or SPOOLMAN_MODE are unset, printf emits empty strings and the app fails to parse the config on startup. Defaults should be baked in (e.g. ${FILAMENT_DIAMETER:-1.75}).

@YogevBokobza
Copy link
Copy Markdown
Author

@koen01 I will fix the issues.
Please add Update Branch button (By Github admin settings)

@YogevBokobza YogevBokobza requested a review from koen01 March 19, 2026 10:37
@YogevBokobza
Copy link
Copy Markdown
Author

@koen01 Done

@YogevBokobza
Copy link
Copy Markdown
Author

YogevBokobza commented Mar 19, 2026

@koen01
Also, please open the Issues section..
I get this error I didn't have before:

cfsync  | [MOON] (192.168.1.XXX) send_gcode exception for 'SET_ACTIVE_SPOOL ID=26': timed out
cfsync  | [MOON] (192.168.1.XXX) SET_ACTIVE_SPOOL ID=26 — FAILED

And in Fluidd now its looks like this:
image

But everything is connected well. (I only have one box)

@malaki86
Copy link
Copy Markdown

malaki86 commented Mar 20, 2026

I can verify that same "disconnected" issue. It only exists in the Fluidd panel, though. If I open the CFSync web page, everything displays properly. Refreshing the TamperMonkey script has no effect on it.

@koen01
Copy link
Copy Markdown
Owner

koen01 commented Mar 20, 2026 via email

@malaki86
Copy link
Copy Markdown

Updated, but showing the same "Disconnected" panel in Fluidd. Main interface is good.

@malaki86
Copy link
Copy Markdown

I also just noticed that CFSync isn't telling Spoolman which spool is in use at filament changes.

@YogevBokobza
Copy link
Copy Markdown
Author

I pushed a update. Can you check if that fixes things. Op do 19 mrt 2026, 12:25 schreef YogevBokobza @.>:

YogevBokobza left a comment (koen01/CFSync#2) <#2 (comment)> @koen01 https://github.com/koen01 Also, please open the Issues section.. I get this error I didn't have before: cfsync | [MOON] (192.168.1.XXX) send_gcode exception for 'SET_ACTIVE_SPOOL ID=26': timed out cfsync | [MOON] (192.168.1.XXX) SET_ACTIVE_SPOOL ID=26 — FAILED — Reply to this email directly, view it on GitHub <#2 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABANKADOXME5VUK4WFBD53D4RPKKPAVCNFSM6AAAAACWQ27JLSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHM2DAOBZGQ2TOMBTGU . You are receiving this because you were mentioned.Message ID: @.
>

Still the same issues in Fluidd.. Disconnected in displayed

@YogevBokobza
Copy link
Copy Markdown
Author

@koen01
Can you review and merge this PR?

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.

3 participants