Wave 1 of the Postgres migration (archie-core-7r0x.9). This is the shared shape every port lane builds on; nothing here switches a live path to Postgres yet. - config: add `database_url` beside `db_path` (config.go), mark it bootstrap-only in denied_keys, expose it in the webui StorageView/config schema, and add it to config.example.toml plus all deployments/*.toml. - docker-compose: add a postgres:18 service; `task dev` (dev:postgres) brings it up and waits for it before the State Store boots. - archied: `openStateStore` now opens and migrates the process-scoped Postgres pool via `openStateStorePool`. The State Store fails closed (D1.2) when database_url is absent or invalid rather than fall back to SQLite; serving against Postgres later requires an import-completion record (D1.3), which is a later lane's gate, not this one. - composition seam: task-store construction (state_store_task.go) and EDA-store construction (state_store_eda.go) are extracted from openStateStore, with the pool open in state_store_pool.go. This is a behaviour-preserving refactor only — no store, interface, error, ordering or logging change — so L1 and L2 build against separate files instead of sharing state_store.go. Tests: fail-closed pool behaviour is pinned (absent/invalid URL); the State Store boot/restart tests now run against a throwaway Postgres 18 container (pgtest TestMain). Scoped test command and module-wide build pass; see lane report.
36 lines
1.7 KiB
TOML
36 lines
1.7 KiB
TOML
# Development overlay for `task dev` and `task dev:dashboard`.
|
|
#
|
|
# Match Vite's API/event proxy without changing the installed configuration.
|
|
# After the UI cutover (archie-core-8cda.5.4) the dashboard on :8484 is the
|
|
# archie-ui process's listener, not archied's; this overlay is what both
|
|
# `go run ./cmd/archied -config-overlay deployments/dev.toml` and
|
|
# `go run ./cmd/archie-ui -config-overlay deployments/dev.toml` read. Only
|
|
# [web], [services.*] and [capture] land in archie-ui; the daemon ignores
|
|
# [web] entirely.
|
|
|
|
# `task dev` runs archie-state-store against this overlay, and the State Store
|
|
# fails closed without a PostgreSQL URL. This must reach the `postgres`
|
|
# service in docker-compose.yml, which `task dev` brings up first via
|
|
# dev:postgres -- keep the URL and that service in agreement.
|
|
database_url = "postgres://archie:archie@127.0.0.1:5432/archie?sslmode=disable"
|
|
|
|
[web]
|
|
listen = "127.0.0.1:8484"
|
|
|
|
# `task dev` runs archie-state-store via dev:state-store, which passes no
|
|
# -listen, so the listen below is the port the store binds. It must agree with
|
|
# the target: these two lines are the only place that pair is stated. Move them
|
|
# when a port is already taken on the host -- before the
|
|
# listen key existed the collision could only be worked around by hand-writing
|
|
# a matching target and passing -listen, and it read as a code fault.
|
|
# (docs/prds/state-store-contract.md §12 step 7).
|
|
[services.state]
|
|
target = "127.0.0.1:9091"
|
|
listen = "127.0.0.1:9091"
|
|
|
|
# `task dev` runs archie-gateway via dev:gateway, which also passes no -listen:
|
|
# the listen below is what it binds. Stated explicitly so the value archie-ui
|
|
# dials is visible next to the State Store one.
|
|
[services.gateway]
|
|
target = "127.0.0.1:8585"
|
|
listen = "127.0.0.1:8585" |