Add persistent local podman DB for development#626
Merged
Conversation
Lets a developer run the web app against a podman PostgreSQL container whose data survives restarts (bind-mounted to dev/db-data/), with a seeded admin login that actually works. Coexists with the existing ephemeral test DB — different container, different port. Setup - t/04-dev-password.sh: optional init-time script gated on AGRAMMON_DEV_PASSWORD. No-op for the test DB; sets a usable bcrypt password on the seeded `test@agrammon.ch` row when called from the dev DB target. - t/Dockerfile: COPY the new init script (chmod +x). - Makefile.am: dev-db-start/stop/restart/logs/psql/reset targets. Container `agrammon-dev-db` on port 55433, bind-mounts `$(abs_top_builddir)/dev/db-data` (Z relabel for SELinux), passes AGRAMMON_DEV_PASSWORD=agrammon by default. dev-db-reset has a safety check refusing to wipe paths not ending in `/dev/db-data`. - dev/agrammon.dev.yaml: single-farm config pointed at port 55433. - runWebDev.sh: launches the web app against that config; refuses to run if the dev container isn't up. - dev/README-podman.md: workflow docs (start, login, schema-change reset cycle, side-by-side test vs dev table). - .gitignore: dev/db-data/. Smoke tested: container starts, `test@agrammon.ch` / `agrammon` login verified via crypt() round-trip, marker row survives stop+start cycle, dev-db-reset safety check rejects bogus DEV_DB_DATA paths. Test DB (`agrammon-postgres` on 55432) and dev DB (`agrammon-dev-db` on 55433) run side by side without conflict. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Lets a developer run the web app against a podman PostgreSQL container whose data survives restarts (bind-mounted to dev/db-data/), with a seeded admin login that actually works. Coexists with the existing ephemeral test DB — different container, different port.
Setup
test@agrammon.chrow when called from the dev DB target.agrammon-dev-dbon port 55433, bind-mounts$(abs_top_builddir)/dev/db-data(Z relabel for SELinux), passes AGRAMMON_DEV_PASSWORD=agrammon by default. dev-db-reset has a safety check refusing to wipe paths not ending in/dev/db-data.Smoke tested: container starts,
test@agrammon.ch/agrammonlogin verified via crypt() round-trip, marker row survives stop+start cycle, dev-db-reset safety check rejects bogus DEV_DB_DATA paths. Test DB (agrammon-postgreson 55432) and dev DB (agrammon-dev-dbon 55433) run side by side without conflict.