Polish Docker, site API docs, and deliverer packaging#81
Merged
Conversation
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.
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.
Stacked PR 9 of 9.
Base:
stack-08-rollout-hardeningHead:
stack-09-docker-and-final-polishPrevious PR: #80
Summary:
Review notes:
This final PR contains development-environment cleanup plus final API/docs/test polish that landed after the larger architectural pieces.