WordPress makes two assumptions this project cannot accept: that identity comes from an email address, and that a site lives at one server. Both are things somebody else can take away — a mailbox is rented from a provider who can close it or be compelled to open it, and a server is one seizure from being gone. Sirius Press replaces the first and hedges the second. Signing in means signing a challenge with the key that controls a CashAddress. The address is recovered from the signature, so nothing is typed but the signature itself, and the result is an ordinary WordPress session cookie — roles, capabilities, nonces and the REST API never learn the login was different. Three ways to produce one: a wallet the browser already exposes, a phrase used once in the page and wiped, or a signature pasted in from any BIP-137 wallet, which needs no JavaScript and lets the key stay on a machine that never touches the web. There is no password reset, and the recovery page says so plainly rather than offering a form that cannot work. A reset mechanism is by construction a way to take an account from its owner, and it is always easier to attack than the cryptography it bypasses. Publishing a post also exports it as static HTML to the name's storage on Sia, signed by the key that owns the name, so the site keeps answering when the server does not. Email as a feature is untouched. wp_mail() still works, SMTP still sends, and contact forms still deliver to addresses real people typed. Only mail to the site's own unroutable placeholder addresses is diverted to an in-app inbox. The objection was to email as identity, not to email. Core is pinned and patched rather than vendored. WordPress 7.1.1 is 149 MB and 5,008 files; the fork's entire core diff is 75 lines in wp-admin/install.php. Carrying the former to express the latter would bury the patch where nobody reviews it and make every clone of the monorepo pay for it. Upstream releases still merge through tools/update-wordpress.sh, which reapplies the series and says exactly which hunk needs a human. The cryptography is implemented twice — PHP on the server, JavaScript in the page — because the server must verify and the browser must sign. Both are pinned against libauth, the library the Sirius portal wallet and the BNS gateway already use, so a disagreement of one byte fails the test suite rather than presenting as a rejected login at three in the morning. 132 checks, no framework, about a second.
86 lines
3.1 KiB
Docker
86 lines
3.1 KiB
Docker
# Sirius Press — PHP-FPM image with a verified, patched WordPress baked in.
|
|
#
|
|
# The image builds core rather than inheriting the official `wordpress` image
|
|
# on purpose. That image ships whatever WordPress version it was tagged with,
|
|
# and the patch series here is pinned to an exact one; silently applying a
|
|
# fork's patches to a different core is how a setup wizard ends up half
|
|
# rewritten. Downloading the pinned tarball and checking its hash during the
|
|
# build makes the version an explicit, verifiable property of the image.
|
|
#
|
|
# Core is installed to /opt/sirius-press/core, not to the document root. The
|
|
# entrypoint copies it into place on every start, which is what makes
|
|
# `docker compose build --pull && up -d` a real upgrade: the usual layout,
|
|
# where the document root is itself a volume, pins core to whatever version
|
|
# first created that volume and turns every security release into a manual
|
|
# migration.
|
|
#
|
|
# GMP is installed because the wallet cryptography runs in PHP. Without it the
|
|
# fork falls back to BCMath, which works and is roughly twenty times slower —
|
|
# unavoidable on a shared host, wasteful in a container we control.
|
|
|
|
FROM php:8.3-fpm-bookworm
|
|
|
|
ARG WP_VERSION
|
|
ARG WP_URL
|
|
ARG WP_SHA256
|
|
|
|
RUN set -eux; \
|
|
apt-get update; \
|
|
apt-get install -y --no-install-recommends \
|
|
ca-certificates curl patch \
|
|
libfreetype6-dev libjpeg62-turbo-dev libpng-dev libwebp-dev \
|
|
libzip-dev libgmp-dev libicu-dev \
|
|
; \
|
|
docker-php-ext-configure gd --with-freetype --with-jpeg --with-webp; \
|
|
docker-php-ext-install -j"$(nproc)" \
|
|
bcmath gd gmp intl mysqli opcache zip exif \
|
|
; \
|
|
rm -rf /var/lib/apt/lists/*
|
|
|
|
# Settings a WordPress host wants and the PHP image does not set.
|
|
RUN { \
|
|
echo 'upload_max_filesize = 64M'; \
|
|
echo 'post_max_size = 64M'; \
|
|
echo 'memory_limit = 256M'; \
|
|
echo 'max_execution_time = 120'; \
|
|
echo 'opcache.memory_consumption = 128'; \
|
|
echo 'opcache.max_accelerated_files = 10000'; \
|
|
echo 'opcache.revalidate_freq = 2'; \
|
|
echo 'expose_php = Off'; \
|
|
} > /usr/local/etc/php/conf.d/sirius-press.ini
|
|
|
|
# --- core, verified -----------------------------------------------------------
|
|
|
|
RUN set -eux; \
|
|
curl -fsSL -o /tmp/wp.tar.gz "$WP_URL"; \
|
|
echo "$WP_SHA256 /tmp/wp.tar.gz" | sha256sum -c -; \
|
|
mkdir -p /opt/sirius-press; \
|
|
tar -xzf /tmp/wp.tar.gz -C /tmp; \
|
|
mv /tmp/wordpress /opt/sirius-press/core; \
|
|
rm -rf /tmp/wp.tar.gz
|
|
|
|
# --- the fork -----------------------------------------------------------------
|
|
|
|
WORKDIR /opt/sirius-press/core
|
|
|
|
COPY patches/ /tmp/patches/
|
|
RUN set -eux; \
|
|
for p in /tmp/patches/*.patch; do \
|
|
patch -p1 -F3 --forward --silent < "$p" \
|
|
|| { echo "patch $p did not apply to WordPress $WP_VERSION"; exit 1; }; \
|
|
done; \
|
|
rm -rf /tmp/patches; \
|
|
echo "$WP_VERSION" > /opt/sirius-press/core/.sirius-core-version
|
|
|
|
COPY plugins/ /opt/sirius-press/core/wp-content/plugins/
|
|
COPY mu-plugins/ /opt/sirius-press/core/wp-content/mu-plugins/
|
|
|
|
COPY docker/entrypoint.sh /usr/local/bin/sirius-entrypoint
|
|
RUN chmod +x /usr/local/bin/sirius-entrypoint; \
|
|
mkdir -p /var/www/html /var/www/config; \
|
|
chown -R www-data:www-data /var/www/html /var/www/config
|
|
|
|
WORKDIR /var/www/html
|
|
|
|
ENTRYPOINT ["sirius-entrypoint"]
|
|
CMD ["php-fpm"]
|