Skip to content

Polish Docker, site API docs, and deliverer packaging#81

Merged
chrisbliss18 merged 13 commits into
v2from
stack-09-docker-and-final-polish
Apr 28, 2026
Merged

Polish Docker, site API docs, and deliverer packaging#81
chrisbliss18 merged 13 commits into
v2from
stack-09-docker-and-final-polish

Conversation

@chrisbliss18
Copy link
Copy Markdown
Contributor

Stacked PR 9 of 9.

Base: stack-08-rollout-hardening
Head: stack-09-docker-and-final-polish
Previous PR: #80

Summary:

  • Simplifies Docker env port overrides and clarifies Docker API binding.
  • Documents Docker env sample groups and handles Docker runtime permissions.
  • Refines Docker development setup, MySQL readiness, API binding, Mailpit, healthchecks, ignored volumes, and entrypoints.
  • Exposes site scheduling fields in API responses and documents the site soft-delete contract.
  • Packages the standalone deliverer service.
  • Covers gateway tenant event access paths.
  • Adds the completed roadmap section covering the work now represented by this stack.

Review notes:
This final PR contains development-environment cleanup plus final API/docs/test polish that landed after the larger architectural pieces.

Chris Jean added 13 commits April 27, 2026 23:11
Keep container-side service ports hardcoded in docker-compose while leaving host-side overrides in docker/.env-sample. Rename the Docker env variables to shorter names, including MYSQL_* and WPCOM_AUTH_TOKEN, and stop passing the entire .env file into containers.

Also update Docker config generation so local compose starts the API on the hardcoded internal port and document that .env is for local overrides, credentials, and user ids.
Add section comments to docker/.env-sample so local developers can distinguish host-side port bindings, credentials, container user ids, and the local-only legacy DB update escape hatch.
Explain that docker/.env-sample API_PORT is a host-side Compose binding and distinct from the API listener in config/config.json, which Docker-generated config enables on the hardcoded container port.
Bind mount logs and stats into the Jetmon container so runtime files land in writable host directories, and make the startup script report clearer permission guidance when those paths are not writable.

Let the Veriflier startup script fall back to a generated /tmp config when the bind-mounted config directory is not writable by the container user.
Switch the Compose stack to a dedicated Jetmon MySQL user and add a one-shot mysql-user setup service so existing local volumes get the app account before Jetmon starts.

Rename Docker host bindings to *_HOST_PORT variables, bind published ports to localhost by default, and keep container-internal listener ports fixed for service-to-service traffic.

Move Graphite and StatsD runtime state to named volumes, remove the old bind-mount placeholders, and make the entrypoints fail fast on startup errors.
Make the Compose healthcheck use a TCP ping so the healthy state matches what peer containers need.

Add a bounded retry loop to the mysql-user setup script before it creates grants, covering the startup race where MySQL is alive locally but not yet accepting connections from another container.
Add API_BIND_ADDR so the local Compose stack can publish the REST API beyond localhost while keeping MySQL, Veriflier, Graphite, StatsD, and the dashboard behind the shared localhost bind.

Document the split in the Docker env sample and README so host-port variables remain clearly separated from container-internal listener ports.
Add Mailpit to the local Compose stack and generate new Docker configs with SMTP email delivery pointed at the internal mailpit:1025 service.

Add healthchecks for Jetmon, Veriflier, Mailpit, and StatsD, and include the small runtime tools the Go service images need for those checks.

Ignore legacy Docker volume output and simplify the entrypoint config render paths so writable-config and temporary-config modes share the same rendering logic.
Add a systemd unit for jetmon-deliverer so the outbound delivery split has a concrete production service definition. The unit uses the shared DB environment file and a process-specific deliverer config path.

Give jetmon-deliverer its own validate-config command that checks config parsing, DB connectivity, email transport mode, and delivery ownership before operators enable the service.

Update the rollout docs and README to describe the service packaging, shell DB environment expectations, and remaining deployment-system wiring.
Add mapped and unmapped gateway-tenant coverage for site event lists and event transition lists so those route families exercise both sides of the public gateway ownership contract.

Cover the mapped trigger-now path as well, complementing the existing unmapped-site rejection test and proving gateway-routed manual checks still reach the normal check flow when ownership is valid.
Add a completed section to ROADMAP.md so collaborators can quickly see the major work that has already landed instead of reconstructing project state from commit history.

The section covers the original v1-to-v2 Go rewrite foundation as well as the later eventstore, API, delivery, rollout, Docker, documentation, and testing accomplishments on this branch.
@chrisbliss18 chrisbliss18 changed the base branch from stack-08-rollout-hardening to v2 April 28, 2026 14:55
@chrisbliss18 chrisbliss18 merged commit e68b7e4 into v2 Apr 28, 2026
@chrisbliss18 chrisbliss18 deleted the stack-09-docker-and-final-polish branch April 28, 2026 15:08
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