feat(config): add standalone configuration section #652
No reviewers
Labels
No labels
Compat/Breaking
Kind/Bug
Kind/Documentation
Kind/Enhancement
Kind/Feature
Kind/Security
Kind/Testing
Priority
Critical
Priority
High
Priority
Low
Priority
Medium
Reviewed
Confirmed
Reviewed
Duplicate
Reviewed
Invalid
Reviewed
Won't Fix
Status
Abandoned
Status
Blocked
Status
Need More Info
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
thwap/thwap-pagesd!652
Loading…
Reference in a new issue
No description provided.
Delete branch "feat/standalone-config"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
What
Add the standalone-specific configuration section, completing Phase 1 of the Docker roadmap.
config.StandaloneConfigonconfig.Config(standalone.*in YAML/TOML,THWAP_PAGESD_STANDALONE_*env).standalone.socket_path(default/var/run/docker.sock); wired intonewDeployerso standalone mode connects to the configured socket.standalone.base_dir(default/var/lib/thwap-pagesd), the site-storage root per the deployment model.standalone.network_mode(bridgedefault,host,custom), validated at config load. Custom network names arrive with Phase 3 (#376).standalone.port_range, a"min-max"host-port range for site containers, parsed when port allocation lands (Phase 3 #369).Why
Phase 1 of the Docker roadmap needs standalone runtime knobs before container lifecycle (Phase 2) and port/networking (Phase 3) build on them. This is the config surface; only the socket path has a runtime consumer today.
Testing
internal/config— default assertions for all standalone fieldsstandalonesection;wantstructs updatedTHWAP_PAGESD_STANDALONE_*)network_modevalidation (bridge/host/custom accepted, others rejected)go vet ./...cleango test -race -count=1 ./...full suite, no failuresBreaking Changes
None. New optional config section; defaults preserve existing behavior.
Notes
base_dir,network_mode, andport_rangehave no runtime consumer yet — they are consumed by Phase 2/3 (container creation #349, networking #378, port allocation #369).Closes #338
Closes #339
Closes #340
Closes #341
Closes #342
Closes #343
Clean, focused config PR completing Phase 1. Defaults match the deployment model, env mapping (
THWAP_PAGESD_STANDALONE_*) is consistent with the existing viper prefix+replacer scheme,network_modeis validated at load, and the socket path is wired intonewDeployer. Tests cover defaults, YAML/TOML fixtures, env overrides, and validation. Referenced issues #338–#343 are all closed and the roadmap checkboxes match; the Phase 1 milestone is now fully complete.Suggestions
internal/config/config.go—port_rangedeclares"min-max"semantics butvalidate()only constrainsnetwork_mode; malformed ranges load silently until Phase 3 parses them. Consider validating format/bounds at load. Filed as #653.cmd/thwap-pagesd/main.go—docker.NewClient(cfg.Standalone.SocketPath)always buildsunix://+path, so a relativesocket_pathbreaks; the unuseddocker.AbsSocketPathhelper can resolve it. Filed as #654.No blocking issues. Approving.