fix: critical compose bugs, improve data-ingest CLI, and complete [1] Local runnable product shell #46
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "feat/10.1-continuous-deployment"
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?
Summary
Thorough review of the Phase 1 implementation uncovered three critical bugs and several improvements. All fixes pass the existing lint, typecheck, and test suites.
Critical fixes
PostgreSQL volume path (
compose.yaml:22): Mounted at/var/lib/postgresqlinstead of/var/lib/postgresql/data. The PostgreSQL image stores data in thedatasubdirectory; without this fix, data would not persist across container restarts.Web health check URL (
compose.yaml:90): The health check fetched/healthbut the TanStack Start route is at/api/health. This would cause the container to report unhealthy and trigger continuous restarts.COMPOSE_PROJECT_NAMEfrom env file (Justfile:58-62): Docker Compose's--env-fileonly performs variable substitution in the compose file; it does not set environment variables for compose config likeCOMPOSE_PROJECT_NAME. Without this fix, production and staging deployments would use the same project name (lawnet-scraperfrom the compose file'sname:field), sharing containers, networks, and volumes. Fixed by extracting the project name from the env file and passing it via-p.Improvements
Data-ingest CLI now has proper
schedulerandworkersubcommands with argparse, matching whatcompose.yamlinvokes. Adds a PostgreSQL connectivity check usingpsycopgwith graceful degradation ifDATABASE_URLis unset orpsycopgis unavailable.Removed unnecessary
web-edgenetwork since the web port is bound to loopback only — the extra network added no security or routing value..env.exampleport aligned with README (3406 instead of 12345, matching the 34xx pattern used by prod/staging ports 3410/3411).Verification
Closes #36
@ -20,3 +20,3 @@restart: unless-stoppedvolumes:- postgres-data:/var/lib/postgresql- postgres-data:/var/lib/postgresql/dataFor pg18? Help me doule check this with web search
Good catch. Confirmed from Docker Hub docs:
The rule:
/var/lib/postgresql/data/var/lib/postgresql(because PGDATA is now/var/lib/postgresql/18/docker)The original code was correct for
postgres:18-alpine. Reverted the change.a4a55f72d91a58b2aee3