Skip to content

feat(docker): migrate to Debian stable, add deployer CLI to builder stage#43

Merged
pparage merged 5 commits into
devfrom
feat/issue-42-docker-debian-stable
May 20, 2026
Merged

feat(docker): migrate to Debian stable, add deployer CLI to builder stage#43
pparage merged 5 commits into
devfrom
feat/issue-42-docker-debian-stable

Conversation

@t0kubetsu
Copy link
Copy Markdown
Contributor

@t0kubetsu t0kubetsu commented May 11, 2026

Summary

Closes #42

  • Base image changed from Alpine to Debian stable (bookworm) — `node:24-bookworm-slim` for the builder, `nginx:stable-bookworm` for the runtime. Debian stable was chosen over Ubuntu LTS: it avoids Ubuntu-specific packaging quirks, has an equally long support lifecycle, and is the reference platform used in our existing Debian VM test environment.
  • Node.js upgraded to 24 (latest stable) — compatible with the `>=22.12.0` engines constraint already defined in `package.json`.
  • range42-deployer CLI installed in builder stage via a Python venv (`/opt/deployer-env`) — PEP 668 compliant (Debian bookworm, like Ubuntu 23.04+, blocks system-level `pip install`; a venv is the correct solution on both distros).
  • Optional `DEPLOYER_CLI_VERSION` build arg for pinning the CLI to a specific release.
  • `docker-compose.yml` now includes an explicit `healthcheck` block (mirrors the `HEALTHCHECK` instruction in the Dockerfile).
  • `README.md` gains a Docker: Build & Push section with tag, push, and build-arg examples.

Test plan

  • `docker compose up --build` succeeds and `docker compose ps` reports `healthy`
  • `curl http://localhost:3000/health\` returns `ok`
  • SPA loads at `http://localhost:3000\`
  • `docker build --build-arg DEPLOYER_CLI_VERSION=1.2.3 .` completes without error (once a release exists)
  • `docker run --rm range42-deployer --version` confirms the CLI is on `PATH`

t0kubetsu added 2 commits May 11, 2026 12:52
…r stage

Addresses #42. Replaces Alpine-based images with node:22-bookworm-slim
(builder) and nginx:stable-bookworm (runtime) to use a predictable,
Debian stable base without Ubuntu-specific constraints.

Installs range42-deployer CLI into an isolated Python venv in the builder
stage (PEP 668-compliant — Debian bookworm blocks system-level pip installs).
Adds DEPLOYER_CLI_VERSION build arg for optional version pinning.

Also adds healthcheck to docker-compose.yml and a Docker build/push
section to README.md.
@hyde-repo
Copy link
Copy Markdown
Member

@pparage , could you please take care of reviewing and testing this PR?
Thank you!

t0kubetsu added 2 commits May 20, 2026 14:18
>=22.12.0 already permitted Node 24 but was ambiguous.
Pin each supported LTS explicitly: ^20.19.0 || ^22.12.0 || ^24.0.0.
@t0kubetsu
Copy link
Copy Markdown
Contributor Author

Two fixes pushed to this branch following a full review of issue #42:

1. package.json engines (1fd4d6c)
Updated from "^20.19.0 || >=22.12.0" to "^20.19.0 || ^22.12.0 || ^24.0.0". The >=22.12.0 range already permitted Node 24 but was ambiguous about intent — each supported LTS is now listed explicitly, consistent with the node:24-bookworm-slim pin in the Dockerfile.

2. .env.example (ea7c9a5)
Added with UI_PORT=3000. The README's Docker section already references cp .env.example .env but the file was missing from the branch, which would cause docker compose up to fail with an unresolved variable warning.


This PR now addresses all requirements from issue #42. Issue #42 has been reopened and will close automatically when this PR merges. Ready for review and merge into dev.

# Conflicts:
#	.env.example
@pparage pparage merged commit d4a4c8d into dev May 20, 2026
@pparage pparage deleted the feat/issue-42-docker-debian-stable branch May 20, 2026 13:16
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