19 Commits

Author SHA1 Message Date
Valentin Lab
8f73a16f5c fix: [plausible] close the unauthenticated code execution of `/storybook with 3.2.1`
Plausible Community Edition up to ``3.2.0`` serves ``/storybook``, which
compiles and runs code sent by any visitor (CVE-2026-8467,
GHSA-mhcv-h7gf-57cf).  It was used to install cryptocurrency miners in
the container of a ``3.0.1`` deployment.  ``3.2.1`` removes the endpoint.

- Use ``docker.0k.io/plausible:3.2.1`` (from
  ``ghcr.io/plausible/community-edition:v3.2.1``).  The database
  migrations run at start as before; ``3.0.1`` data migrates without
  manual step.
- The default web-proxy rules refuse ``/storybook``, in case an older
  image is ever deployed again.
- The Erlang release cookie of the image is created when the image is
  built, so it is the same on every installation.  The ``init`` hook now
  generates one per installation (``release-cookie``) and sets
  ``RELEASE_DISTRIBUTION`` to ``none``: this single node opens no
  ``epmd`` nor distribution port.

Assisted-by: Claude:claude-opus-5-5
2026-10-27 11:23:21 +01:00
Valentin Lab
7ffadbf2ff fix: [clickhouse] apply the low-memory settings that ClickHouse was ignoring
The ``max_threads``, ``max_block_size``, ``max_download_threads`` and
parallel parsing and formatting settings were declared in a
``<profile>`` block of ``config.d/low-resources.xml``.  ClickHouse only
reads profile settings from users configuration files, so they were
silently ignored and the server used its defaults (one thread per core,
larger blocks).

Following the Plausible Community Edition change of ``v3.2.0`` (its
pull request 265), ``config.d/low-resources.xml`` now keeps only the
server setting ``mark_cache_size``, and the profile settings move to
``users.d/default-profile-low-resources-overrides.xml``, inside
``<profiles>``.  ``system.settings`` now reports ``max_threads`` 1.

Assisted-by: Claude:claude-opus-5-5
2026-10-27 11:23:21 +01:00
Stéphan Sainléger
002d8fe196 fix: [carbone-ee] enable Studio and template management
The charm had no ``hooks/init``, so Carbone started in its default
stateless mode: no Studio, no template management, and ``CARBONE_BIND``
defaulting to ``127.0.0.1`` (unreachable behind the web-proxy).

Add ``hooks/init`` to:
- bind on ``0.0.0.0`` so the ``web-proxy`` can reach the service ;
- serve the Studio and ``/carbone-studio.js`` (``CARBONE_STUDIO``) ;
- enable stateful template management (``CARBONE_TEMPLATE_MANAGEMENT``):
  stable 64-bit template IDs, versioning and the ``/template`` endpoints ;
- align the datastore/configstore ownership on the unprivileged
  ``carbone`` image user, otherwise the container crash-loops with
  ``EACCES`` on ``/app/config/config.json``.

Persist ``/app/config`` as a ``config-resources`` and set a
``docker-compose.stop_grace_period`` of 200s: Carbone flushes its
template metadata on graceful shutdown, and Docker's 10s default would
SIGKILL it and lose templates on redeploy.  Flush metadata every
5 minutes to shrink the hard-crash window.

Bump the image to ``full-5.15.1`` and add a local ``basic-deploy`` test.

Verified locally: ``/status`` 200, ``/carbone-studio.js`` 200,
``GET /templates`` 200, template upload with versioning plus render
from the stable template ID, and metadata survival across a container
recreation.
2026-09-25 19:06:38 +02:00
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
Stéphan Sainléger
31bcaab87f chg: [outline] add restart unless-stopped directive 2026-09-11 15:04:53 +02:00
Boris Gallet
e2f363439c chg: [carbone-ee] upd README with usage 2026-09-11 15:04:53 +02:00
default
dcebdd40a9 chg: [outline] upd to 1.6.1 2026-09-11 15:04:53 +02:00
Boris Gallet
ea874a54ad new: [carbone-ee] new charm for carbone.io 2026-09-11 15:04:53 +02:00
Stéphan Sainléger
a4c1c62952 fix: [outline] correct typo on postgres extention pg_trgm 2026-09-11 15:04:53 +02:00
Boris Gallet
3ef0857c56 fix: [plausible] smpt server config + init first install 2026-09-11 15:04:53 +02:00
Boris Gallet
58c5261756 fix: [outline] remove default OIDC_DISPLAY_NAME 2026-09-11 15:04:53 +02:00
default
56a78a93ee new: [plausible] add charm 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
Boris Gallet
20e8ba665d fix: [outline] fix smtp server config 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
Boris Gallet
710ffb15c6 fix: [n8n] upd 1.45.1 and fix email invitation 2026-09-11 15:04:53 +02:00
default
414895b673 new: [outline] add new charm 2026-09-11 15:04:53 +02:00
default
ea46224bdc new:[n8n] add charm 2024-01-31 18:06:44 +01:00