diff --git a/CHANGELOG.md b/CHANGELOG.md index eb1b8da..0adf11c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,10 +7,17 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +### Added + +- ipx can keep its data in Postgres: set `IPX_DATABASE_URL` to a `postgres://` URL. Without it, + it is the SQLite `state.db` as before. `ipx copy-db ` moves an existing database + across, everything in one go. + ### Changed - The database is reached through SeaORM, on the way to Postgres (issue #18); it is still the - same SQLite file, and nothing you see changes. A database from before 0.7 has to be opened by a + same SQLite file, and nothing you see changes. On Postgres, sorting by title or feed follows + the language's order (an accented letter beside the plain one) rather than raw bytes. A database from before 0.7 has to be opened by a 0.7 release first, which brings its tables up to date. - A pinned item sits at the top of its list, above everything else in whatever order you sort by, and moves there the moment you pin it. Sorting by the pin column itself still goes both diff --git a/CLAUDE.md b/CLAUDE.md index 33e6ed8..026d229 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -14,7 +14,8 @@ Arcane project `content`: `/mnt/fast/arcane/projects/content/compose.yaml`. That |---|---|---| | Image | `192.168.1.130:5000/ipodderx:latest` | | | Config | `/mnt/fast/appdata/ipodderx/config.toml` | `/config/config.toml` | -| Database | `/mnt/user/ipodderx/state.db` | `/data/state.db` | +| Database | Postgres 18, database `ipodderx`, login `ipodderx`, on the `postgres` container of the Arcane project `databases` (`192.168.1.130:5433`). The URL is in `/mnt/fast/appdata/ipodderx/database.env` (root-only), passed to the container as `IPX_DATABASE_URL` | | +| Old database | `/mnt/user/ipodderx/state.db`, SQLite, used until the move to Postgres on 2026-09-18 and kept for rollback | `/data/state.db` | | Downloads | `/mnt/user/ipodderx/downloads` | `/downloads` | | Web UI | `192.168.1.130:8099`, also `ipodderx.sdf1.net` via a Cloudflare tunnel | `0.0.0.0:8099` | | Sign-in via the tunnel | Cloudflare Access app `ipodderx`, with Authentik as its identity provider; see [docs/sso.md](docs/sso.md) | trusts `Cf-Access-Authenticated-User-Email` from `192.168.16.1`, the `content_default` gateway | diff --git a/docs/configuration.md b/docs/configuration.md index ced9093..7deb090 100644 --- a/docs/configuration.md +++ b/docs/configuration.md @@ -11,8 +11,10 @@ effect without a restart. Default location `$XDG_CONFIG_HOME/ipx/config.toml` | Control socket | `$XDG_RUNTIME_DIR/ipx.sock` | `[general] socket` | | Downloads | `[general] download_dir` | — | -`~` is expanded in paths. The database is SQLite in WAL mode; back it up by copying `state.db` -while the daemon is stopped, or with `sqlite3 state.db .backup`. +`~` is expanded in paths. The database is SQLite in WAL mode unless `IPX_DATABASE_URL` names a +Postgres database instead. Back SQLite up by copying `state.db` while the daemon is stopped, or +with `sqlite3 state.db .backup`; back Postgres up with `pg_dump`. `ipx copy-db ` copies a +SQLite database into the empty Postgres one `IPX_DATABASE_URL` names. ## `[general]` @@ -116,6 +118,8 @@ they are re-derived on every scan. Editing one in the UI promotes it to a real c |---|---| | `IPX_CONFIG` | Config file path | | `IPX_DATA_DIR` | Directory holding `state.db` | +| `IPX_DATABASE_URL` | A `postgres://user:password@host:port/database` URL: use that database instead of `state.db` | +| `IPX_TEST_DATABASE_URL` | For `cargo test`: run the database tests on this Postgres database too, each in a schema of its own | | `IPX_LOG` | What reaches stderr (`ipx=debug`, `ipx::scan=debug`, …) | | `IPX_UI_LOG` | What the in-process log buffer captures for the UI's Log view | | `http_proxy` / `https_proxy` | Honoured for feed and enclosure fetches |