Commit Graph

6 Commits

Author SHA1 Message Date
Stéphan Sainléger
fda96565ad fix: [outline] align datastore ownership with the application user
Outline runs as an unprivileged user in the image (``nodejs`` since
1.10.0, ``root`` up to 1.6.1) while the datastore is provisioned by
``root``.  Without realignment the application cannot write its
``uploads``, ``public`` and ``avatars`` buckets, so every attachment
upload fails with "Permission denied writing to ... Check the host
machine file system permissions".  This was seen on elabore.coop
after the 1.6.1 to 1.10.0 upgrade.

The ``init`` hook now reads the image's ``Config.User`` and chowns the
datastore to that user, skipping root-based images.  It is idempotent
and version-agnostic: the realignment also covers buckets added by
future Outline versions.
2026-09-16 23:43:01 +02:00
Stéphan Sainléger
9947900389 fix: [outline] align database ownership before migrations
The ``pre_deploy`` hook reassigns every object of the outline database
(tables, sequences, views, materialized views, standalone types,
functions, procedures) to the application role before the container
runs its migrations.

Historical provisioning or restores running as the ``postgres``
superuser leave objects owned by ``postgres``, so any later ``ALTER``
on them fails with "must be owner of ..." and puts outline in a
crash-loop at migration time.  Seen on elabore.coop when upgrading
1.6.1 -> 1.10.0: migration
``20260714000000-add-mcp-to-search-queries-source.js`` failed on
``enum_search_queries_source``.

Extensions are excluded from the realignment (they are managed by the
``postgres`` charm).  The hook is idempotent, silent when there is no
drift, and blocks the deployment (``exit 1``) if any drift remains, so
the problem surfaces at deploy time instead of as a cryptic
crash-loop.
2026-09-16 23:41:42 +02:00
default
dcebdd40a9 chg: [outline] upd to 1.6.1 2026-09-11 15:04:53 +02:00
Boris Gallet
415805341f chg: [outline] upd to 0.83.0 2026-09-11 15:04:53 +02:00
default
be31b80024 chg: [outline] upd to 0.81.1 2026-09-11 15:04:53 +02:00
default
414895b673 new: [outline] add new charm 2026-09-11 15:04:53 +02:00