From 10f650f060df34317c9e4c6d2904c463adec2f39 Mon Sep 17 00:00:00 2001 From: almac2022 Date: Fri, 15 May 2026 11:20:50 -0700 Subject: [PATCH] docker/README: add restart-after-stop + QGIS connection sections Documents the 'data already loaded' restart path (just docker compose up -d db, no loader re-run) and adds a QGIS DSN block parallel to the existing R connection example. Useful for future-offline-me and anyone connecting to the local fwapg from a non-R workflow. Co-Authored-By: Claude Opus 4.7 --- docker/README.md | 33 ++++++++++++++++++++++++++++++++- 1 file changed, 32 insertions(+), 1 deletion(-) diff --git a/docker/README.md b/docker/README.md index efa4b95..a12e174 100644 --- a/docker/README.md +++ b/docker/README.md @@ -8,7 +8,7 @@ Local PostGIS instance with BC Freshwater Atlas data for running the fresh habit - Local clone of [smnorris/fwapg](https://github.com/smnorris/fwapg) (default: `../../fwapg` sibling directory) - Optional: local clone of [smnorris/bcfishobs](https://github.com/smnorris/bcfishobs) for fish observation queries -## Quick start +## Quick start (first time — empty `postgres-data/`) ```bash cd docker @@ -24,6 +24,37 @@ docker compose run --rm loader docker compose run --rm loader --bcfishobs ``` +## Restart after stop (data already loaded) + +If `postgres-data/` is already populated from a previous run, **don't re-run the loader** — just start the DB: + +```bash +cd docker +docker compose up -d db + +# Wait a few seconds, then verify +docker exec fresh-db pg_isready -U postgres -d fwapg +docker exec fresh-db psql -U postgres -d fwapg -c "\dn" +``` + +The schema list should include `whse_basemapping`, `bcfishpass_ref`, `bcfishobs`, `fwapg`, `cabd`, `fresh`, `psf`, etc. If you only see `public` and the postgis system schemas, the loader hasn't been run — go back to "Quick start" above. + +## Connect from QGIS + +Data Source Manager → PostgreSQL → **New**: + +| Field | Value | +|---|---| +| Name | `fresh-local` (or anything) | +| Host | `localhost` | +| Port | `5432` | +| Database | `fwapg` | +| Username | `postgres` | +| Password | `postgres` | +| SSL mode | `disable` | + +Test Connection → Save. The fwapg schemas (`whse_basemapping.fwa_*`, `bcfishpass_ref.*`, `bcfishobs.*`, etc.) appear under the connection in the Browser panel. + ## Directory layout Default layout assumes sibling repos under a common parent: