From 696e1aea16fbea6e635353ac3f8e3626700e78a1 Mon Sep 17 00:00:00 2001 From: xZero707 Date: Tue, 29 Oct 2024 02:39:46 +0100 Subject: [PATCH] Add init-docker-secrets dependency, update doc --- README.md | 10 +++++----- .../dependencies.d/init-docker-secrets | 0 .../etc/s6-overlay/s6-rc.d/init-install-wordpress/run | 2 +- .../dependencies.d/init-docker-secrets | 0 rootfs/etc/s6-overlay/s6-rc.d/init-wpconfig-verify/run | 2 ++ 5 files changed, 8 insertions(+), 6 deletions(-) create mode 100644 rootfs/etc/s6-overlay/s6-rc.d/init-install-wordpress/dependencies.d/init-docker-secrets create mode 100644 rootfs/etc/s6-overlay/s6-rc.d/init-wpconfig-verify/dependencies.d/init-docker-secrets diff --git a/README.md b/README.md index 4e3a943..fb8f02b 100644 --- a/README.md +++ b/README.md @@ -40,10 +40,10 @@ Attempt to fix several of WordPress anti-patterns in ready to deploy container * If you have custom scripts, you should review them and migrate to new format * S6 supervisor v3 brings many improvements and bugfixes in addition to performance improvements * This change is necessary to ensure compatibility with future base image updates -- 2024-10-28 Deprecate docker hub images - * Done as protest against Docker Hub's hostile behavior towards open source community - * All images will be removed from docker hub - * Please use ghcr.io/n0rthernl1ghts/wordpress instead +- 2024-10-28 Multiple changes + * Deprecate docker hub images + * Add WordPress versions 6.5.3 -> 6.6.2 + * Add support for docker secrets #### Public builds (docker) @@ -122,5 +122,5 @@ COPY --from=wp-plugins-installer ["/var/www/html/wp-content/plugins", "/var/www/ * ~Install/update plugins on the fly using wp cli (with versioning)~ * Install/update themes on the fly using wp cli (with versioning) * ~Apply theme and eventual plugin customizations using patch files~ (Partial) -* Support automatic install using ENV +* ~Support automatic install using ENV~ * Create users automatically using ENV diff --git a/rootfs/etc/s6-overlay/s6-rc.d/init-install-wordpress/dependencies.d/init-docker-secrets b/rootfs/etc/s6-overlay/s6-rc.d/init-install-wordpress/dependencies.d/init-docker-secrets new file mode 100644 index 0000000..e69de29 diff --git a/rootfs/etc/s6-overlay/s6-rc.d/init-install-wordpress/run b/rootfs/etc/s6-overlay/s6-rc.d/init-install-wordpress/run index 80770df..b0067d5 100755 --- a/rootfs/etc/s6-overlay/s6-rc.d/init-install-wordpress/run +++ b/rootfs/etc/s6-overlay/s6-rc.d/init-install-wordpress/run @@ -44,7 +44,7 @@ main() { return 1 fi - wp core install \ + s6-envdir /run/secrets_normalized wp core install \ --url="${WORDPRESS_INIT_SITE_URL:?}" \ --title="${WORDPRESS_INIT_SITE_TITLE:-WordPress}" \ --admin_user="${WORDPRESS_INIT_ADMIN_USER:?}" \ diff --git a/rootfs/etc/s6-overlay/s6-rc.d/init-wpconfig-verify/dependencies.d/init-docker-secrets b/rootfs/etc/s6-overlay/s6-rc.d/init-wpconfig-verify/dependencies.d/init-docker-secrets new file mode 100644 index 0000000..e69de29 diff --git a/rootfs/etc/s6-overlay/s6-rc.d/init-wpconfig-verify/run b/rootfs/etc/s6-overlay/s6-rc.d/init-wpconfig-verify/run index 22f3e24..af5ee40 100755 --- a/rootfs/etc/s6-overlay/s6-rc.d/init-wpconfig-verify/run +++ b/rootfs/etc/s6-overlay/s6-rc.d/init-wpconfig-verify/run @@ -70,6 +70,8 @@ main() { # This will prepend service name to all output from here exec > >(while read -r line; do echo "[init-wpconfig-verify] ${line}"; done) 2>&1 + source /usr/local/bin/load_secrets + echo "Checking salts..." if ! checkSaltsEnv; then echo "^^^ Some or all of the salts are not set. Cannot continue."