Skip to content

Add persistent local podman DB for development#626

Merged
zaucker merged 1 commit into
oposs:mainfrom
zaucker:PodmanDevSetup
May 8, 2026
Merged

Add persistent local podman DB for development#626
zaucker merged 1 commit into
oposs:mainfrom
zaucker:PodmanDevSetup

Conversation

@zaucker
Copy link
Copy Markdown
Contributor

@zaucker zaucker commented May 8, 2026

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.

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>
@zaucker zaucker merged commit b235343 into oposs:main May 8, 2026
2 checks passed
@zaucker zaucker deleted the PodmanDevSetup branch May 8, 2026 16:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant