From a087ae7372f96298e60b914b859ba926b57897a6 Mon Sep 17 00:00:00 2001 From: asonix Date: Fri, 8 Dec 2023 22:37:08 -0600 Subject: [PATCH] readme: fix link, release doc: add postgres information --- README.md | 2 +- releases/0.5.0.md | 41 +++++++++++++++++++++++++++++++++++++++-- 2 files changed, 40 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 775d179..79568ca 100644 --- a/README.md +++ b/README.md @@ -15,7 +15,7 @@ _a simple image hosting service_ 2. [Api](#api) 3. [Administration](#administration) 1. [Backups](#backups) - 2. [0.4 to 0.5 Migration Guide](#0-4-to-0-5-migration-guide) + 2. [0.4 to 0.5 Migration Guide](#04-to-05-migration-guide) 1. [Overview](#overview) 2. [Upgrade Configuration](#upgrade-configuration) 3. [Configuration Updates](#configuration-updates) diff --git a/releases/0.5.0.md b/releases/0.5.0.md index 9e43678..1f85ae2 100644 --- a/releases/0.5.0.md +++ b/releases/0.5.0.md @@ -44,7 +44,7 @@ - [ini and json5](#ini-and-json5) - [Client Pool Size](#client-pool-size) -- [0.3 Migration Path](#0-3-migration-path) +- [0.3 Migration Path](#03-migration-path) - [Prepare Upgrade Endpoint](#prepare-upgrade-endpoint) @@ -66,14 +66,51 @@ will extract metadata for any uploads that have not had their metadata extracted If you have any custom configuration, note that some media-related configuration values have been moved. See [Media Configuration](#media-configuration) below. +pict-rs 0.5 now supports postgres for metadata storage. It is possible to upgrade directly from 0.4 +to 0.5 with postgres, rather than upgrading to 0.5 with sled and then making the migration later. +This process is documented in the +[pict-rs readme](https://git.asonix.dog/asonix/pict-rs#upgrading-directly-to-postgres). + More information can be found in the -[pict-rs readme](https://git.asonix.dog/asonix/pict-rs#04-to-05-migration-guide). +[pict-rs 0.4 to 0.5 migration guide](https://git.asonix.dog/asonix/pict-rs#04-to-05-migration-guide). ## Descriptions ### Postgres Repo +One of the most anticipated features of pict-rs 0.5 is the support for postgres for metadata +storage. This makes pict-rs (mostly) stateless, enabling it to be scaled horizontally across +multiple physical or virtual hosts. It also simplifies administration and backup processes for folks +who are already running a postgres server for other reasons. + +Configuring postgres is simple. The `repo` section of the pict-rs configuration now supports more +than just `sled`. + +In the configuration file +```toml +[repo] +type = 'postgres' +url = 'postgres://user:password@host:5432/db' +``` + +With environment variables +```bash +PICTRS__REPO__TYPE=postgres +PICTRS__REPO__URL=postgres://user:password@host:5432/db +``` + +On the commandline +```bash +pict-rs run filesystem -p ./data postgres -u 'postgres://user:password@host:5432/db' +``` + +It is possible to update from 0.4 directly to 0.5 with postgres, this process is documented in the +[pict-rs readme](https://git.asonix.dog/asonix/pict-rs#upgrading-directly-to-postgres). + +It is possible to migrate to postgres after first upgrading to 0.5. This is also ducmented in the +[pict-rs readme](https://git.asonix.dog/asonix/pict-rs#sled-to-postgres-migration). + ### Media Proxy