[Ch 6] Database provisioning — CNPG for API tokens and sessions #16
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
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?
Type
Feature
Lineage
Standalone — scoped from platform-playbook chapter 6 for the full-stack mdview vision.
Repo
ldraney/mdview,ldraney/pal-e-servicesUser Story
As a developer
I want mdview to have a database
So that it can store API tokens and user sessions for authenticated access
Context
mdview is currently stateless — no database, no models. The full-stack vision requires storing API tokens (so CLI users can authenticate) and user sessions (so web users can log in via Keycloak). This ticket provisions the database on CNPG and adds the pg gem to the app. The actual models come in Ch 11 (integration).
File Targets
Gemfile— addpggemconfig/database.yml— create, pointing to CNPGpal-e-services/terraform/databases.tf— add mdview toservice_databasesFiles the agent should NOT touch:
app/controllers/markdown_controller.rb— no app logic changes in this ticketFeature Flag
none
Acceptance Criteria
pggem in Gemfile and bundle installsconfig/database.ymlexists with CNPG connection configmdviewrole andmdviewdatabase on CNPGrails db:preparesucceeds against CNPGTest Expectations
tofu planin pal-e-services shows database resourcesConstraints
service_databasespattern from landscaping-assistantmdview, role name:mdviewChecklist
Related
project-mdview— project this affectsScope Review: NEEDS_REFINEMENT
Review note:
review-1947-2026-08-01Template complete, traceability partial -- arch note arch-mdview-infra missing, file targets have errors.
arch-mdview-infra(404 in pal-e-docs)databases.tfis the module code (for_each loop); the service_databases entry goes ink3s.tfvarsDockerfileneedslibpq-dev(build) andlibpq5(runtime) for pg gem native extension