Repository navigation
Add a self-contained dev stack - #421
Draft
jamesmulcahy wants to merge 5 commits into
Draft
jamesmulcahy wants to merge 5 commits into
jamesmulcahy wants to merge 5 commits into
Conversation
The dev image was the release image built with IS_DEVEL=yes and no_mqttmanager_build=yes. It copied web/, MQTTManager/, HMI_files/ and the nginx files in before installing anything, so editing any of them reinstalled apt, the build tools, nvm/npm and pip on the next build, although docker-build_and_run_dev.sh mounts all of them over the copies. docker/Dockerfile now has a runtime-base stage with the packages and the web UI, and two final stages on top of it: - devel: the build tools (install_build_tools.sh yes), no source. Built with docker build --target devel, which also skips the MQTTManager build stage. - release: the source and the MQTTManager build. It is the last stage, so a plain docker build and the Home Assistant builder still build it. The release build stage installs the build tools before copying MQTTManager/ in, so a local rebuild after a source edit reuses that layer too. The IS_DEVEL and no_mqttmanager_build build arguments are no longer used. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
docker-build_and_run_dev.sh passed BUILDTIME="$(date)" to force a fresh clone and npm run build of the web UI on every dev build. The ui-builder stage now fetches the commit WEB_UI_REF points at instead, so the clone and build rerun when that commit changes and come from the cache otherwise. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Compiling in the dev container writes the build into the checkout's MQTTManager/build, which mounts over /MQTTManager. .dockerignore only left out some CMake files, so the libraries and binary (about 800 MB of a Debug build) went into the context of every later image build, and into the release image's build stage, which compiles its own. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The release image only serves the generated gui.tft files and example.png previews. The .bmp, .HMI and .xcf sources and the GIMP scripts they are made with are about 610 MB of the 812 MB in HMI_files/. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
docker/dev/nspm-dev runs NSPanelManager from this checkout with its own MQTT broker, in a compose project that never touches real panels or a production broker: - The image is the devel target of docker/Dockerfile, the same one docker-build_and_run_dev.sh builds, so the two share their cached layers and editing the source never rebuilds it. - A fresh database is seeded with MQTT settings pointing at the stack's broker and a room. - MQTTManager builds on start: an existing build is brought up to date, and a first build runs in the background so the web UI is up meanwhile. `nspm-dev rebuild` and `nspm-dev watch` rebuild and restart it. - Build output, the Conan cache and /data live in volumes, so no root-owned files end up in the checkout. NSPM_CONAN_CACHE can name a shared host directory instead. - nginx forwards the port in the Host header, so saving passes Django's CSRF check on any NSPM_DEV_PORT. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This was referenced Nov 1, 2026
This branch has not been deployed
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.
Summary
docker/dev/nspm-devruns NSPanelManager from the checkout with its own MQTT broker, in a compose project that never touches real panels or a production broker. It's meant for working on the web app and MQTTManager without a separate manager or a copy of a production database.mosquittonspm-dev upprints it)nspmhttp://localhost:8010develtarget from Docker: build the dev image as its own target, and shrink the build context #420, the same imagedocker-build_and_run_dev.shbuilds. The two share cached layers, and editing the source never rebuilds the image.nspm-dev rebuildandnspm-dev watchrebuild and restart it./datalive in volumes, so no root-owned files end up in the checkout.NSPM_CONAN_CACHEcan name a shared host directory instead.NSPM_DEV_PORT.The stack has no panels of its own. Point a panel, or the firmware running under QEMU, at the broker port
nspm-dev upprints, and accept it in the web UI as usual.docker/dev/README.mdhas the commands and settings.Draft because
A few follow-ups are still to come before this is ready for review:
nspm-dev rebuildfrom running at the same time.docker compose execfailing on older compose releases.🤖 Generated with Claude Code