F-09: Stimulus bootstrap + main.go wiring + docker-compose demo (#12) #12
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "bd-bookshelf-qqz.9"
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?
Scope
This PR builds on F-09 (Stimulus bootstrap) by adding the full end-to-end server wiring and verifying the demo runs via
docker compose.Changes beyond the original F-09 commit
Rebase onto main — picks up F-04 (internal/db: resilient MySQL connection + golang-migrate runner + Grimmory baseline schema, 72 tables).
cmd/bookshelf/main.go— full app entrypointinternal/config.Load(flags → env → file → defaults)db.Open, retries ping with exponential backoffdb.RunMigrationsbefore serving (fail-fast if broken)AssetVersionfrom SHA256 of embedded static filesGET /healthz,GET /metrics,GET /static/,GET //serves renderedbase.html+home.htmlwithBaseData{AssetVersion, TraceID, Title}; JSON fallback for API clientssignal.NotifyContext+ 30s shutdown timeoutdocker-compose.yml— corrected service wiringdb→mysqlto match DSN hostBOOKSHELF_DSN,BOOKSHELF_HTTP_ADDR,BOOKSHELF_LOG_LEVEL,BOOKSHELF_LOG_FORMAT,BOOKSHELF_DATA_DIRdepends_on: mysql: condition: service_healthy./data:/datavolume mount.gitignore— anchored/bookshelfpattern to repo root socmd/bookshelf/is no longer incorrectly excluded from staging.Docker compose verify
Smoke verify log output
All checks passed: HEALTHZ OK, STIMULUS WIRED OK, STIMULUS SCRIPT TAG OK, APP SCRIPT TAG OK, library table present.
Run locally
Test results
go vet ./...— cleanmake test— 119 specs across 9 suites, all green (includes DB integration tests via testcontainers)make coverage— 100.0% on internal/ + static/Closes bead bookshelf-qqz.9 on merge.
1877903719906f191f33F-09: Stimulus bootstrap + demo controller (bookshelf-qqz.9)to F-09: Stimulus bootstrap + main.go wiring + docker-compose demo (#12)