This commit is contained in:
2026-05-13 03:46:16 +03:30
parent edde2ea185
commit 6e9544eb48
11 changed files with 100 additions and 15 deletions
+1 -1
View File
@@ -8,7 +8,7 @@ WORDPRESS_DB_PASSWORD=wordpress
WORDPRESS_TABLE_PREFIX=wp_
WORDPRESS_DEBUG=1
WORDPRESS_OFFLINE_MODE=1
WORDPRESS_ACCESSIBLE_HOSTS=localhost,127.0.0.1,::1,wordpress,db
WORDPRESS_ACCESSIBLE_HOSTS=localhost,127.0.0.1,::1,wordpress,db,backend-web
MYSQL_DATABASE=wordpress
MYSQL_USER=wordpress
BIN
View File
Binary file not shown.
+11 -1
View File
@@ -1,4 +1,14 @@
FROM mirror-docker.runflare.com/wordpress:php8.2-apache
FROM mirror-docker.runflare.com/wordpress:php8.2-apache
COPY ioncube_loaders_lin_x86-64.tar.gz /tmp/ioncube_loaders_lin_x86-64.tar.gz
RUN set -eux; \
php_ext_dir="$(php -r 'echo ini_get("extension_dir");')"; \
php_version="$(php -r 'echo PHP_MAJOR_VERSION . "." . PHP_MINOR_VERSION;')"; \
tar -xzf /tmp/ioncube_loaders_lin_x86-64.tar.gz -C /tmp; \
cp "/tmp/ioncube/ioncube_loader_lin_${php_version}.so" "${php_ext_dir}/"; \
echo "zend_extension=${php_ext_dir}/ioncube_loader_lin_${php_version}.so" > /usr/local/etc/php/conf.d/00-ioncube.ini; \
rm -rf /tmp/ioncube /tmp/ioncube_loaders_lin_x86-64.tar.gz
# Enable common WordPress-friendly Apache and PHP defaults.
RUN a2enmod rewrite \
+3 -2
View File
@@ -41,11 +41,12 @@ services:
WORDPRESS_TABLE_PREFIX: ${WORDPRESS_TABLE_PREFIX}
WORDPRESS_DEBUG: ${WORDPRESS_DEBUG}
WORDPRESS_OFFLINE_MODE: ${WORDPRESS_OFFLINE_MODE:-1}
WORDPRESS_ACCESSIBLE_HOSTS: ${WORDPRESS_ACCESSIBLE_HOSTS:-localhost,127.0.0.1,::1,wordpress,db}
WORDPRESS_ACCESSIBLE_HOSTS: ${WORDPRESS_ACCESSIBLE_HOSTS:-localhost,127.0.0.1,::1,wordpress,db,backend-web}
ports:
- "${WORDPRESS_PORT}:80"
volumes:
- ./:/var/www/html
- ./wp-content:/var/www/html/wp-content
- ./wp-config.php:/var/www/html/wp-config.php
networks:
- wp_internal
- wp_public
+22
View File
@@ -0,0 +1,22 @@
#!/usr/bin/env sh
set -eu
ROOT_DIR=$(CDPATH= cd -- "$(dirname -- "$0")/.." && pwd)
ARCHIVE_NAME="ioncube_loaders_lin_x86-64.tar.gz"
ARCHIVE_PATH="${ROOT_DIR}/${ARCHIVE_NAME}"
IONCUBE_URL="${IONCUBE_URL:-https://downloads.ioncube.com/loader_downloads/${ARCHIVE_NAME}}"
if [ -s "${ARCHIVE_PATH}" ]; then
echo "ionCube archive already exists: ${ARCHIVE_PATH}"
exit 0
fi
TMP_PATH="${ARCHIVE_PATH}.tmp"
trap 'rm -f "${TMP_PATH}"' INT TERM EXIT
echo "Downloading ionCube archive to ${ARCHIVE_PATH}"
curl -fL --connect-timeout 10 --max-time 120 "${IONCUBE_URL}" -o "${TMP_PATH}"
mv "${TMP_PATH}" "${ARCHIVE_PATH}"
trap - INT TERM EXIT
echo "ionCube archive saved: ${ARCHIVE_PATH}"
+7 -7
View File
@@ -124,13 +124,13 @@ $wordpress_offline_mode = filter_var(
if ( $wordpress_offline_mode ) {
define( 'WP_HTTP_BLOCK_EXTERNAL', true );
define(
'WP_ACCESSIBLE_HOSTS',
getenv_docker('WORDPRESS_ACCESSIBLE_HOSTS', 'localhost,127.0.0.1,::1,wordpress,db')
);
define( 'AUTOMATIC_UPDATER_DISABLED', true );
define( 'WP_AUTO_UPDATE_CORE', false );
}
define(
'WP_ACCESSIBLE_HOSTS',
getenv_docker('WORDPRESS_ACCESSIBLE_HOSTS', 'localhost,127.0.0.1,::1,wordpress,db,backend-web')
);
define( 'AUTOMATIC_UPDATER_DISABLED', true );
define( 'WP_AUTO_UPDATE_CORE', false );
}
// If we're behind a proxy server and using HTTPS, we need to alert WordPress of that fact
// see also https://wordpress.org/support/article/administration-over-ssl/#using-a-reverse-proxy
@@ -0,0 +1,56 @@
<?php
/**
* Plugin Name: CropLogic Performance Guards
* Description: Reduces delays caused by blocked external services on this WordPress install.
*/
if ( ! defined( 'ABSPATH' ) ) {
exit;
}
/**
* Convert env values like 1/true/on/yes into booleans.
*/
function croplogic_env_flag( $name, $default = false ) {
$value = getenv( $name );
if ( false === $value || '' === $value ) {
return $default;
}
return filter_var( $value, FILTER_VALIDATE_BOOLEAN );
}
/**
* Stop the theme from waiting on Google Fonts when external traffic is blocked.
*/
function croplogic_disable_upstudy_google_fonts() {
wp_dequeue_style( 'upstudy-main-fonts' );
wp_deregister_style( 'upstudy-main-fonts' );
}
add_action( 'wp_enqueue_scripts', 'croplogic_disable_upstudy_google_fonts', 100 );
/**
* Short-circuit login/admin notification emails that can hang on blocked SMTP calls.
*/
function croplogic_skip_slow_wp_mail( $pre, $atts ) {
if ( ! croplogic_env_flag( 'WORDPRESS_DISABLE_SLOW_MAIL', true ) ) {
return $pre;
}
$request_uri = isset( $_SERVER['REQUEST_URI'] ) ? (string) wp_unslash( $_SERVER['REQUEST_URI'] ) : '';
$is_login = false !== strpos( $request_uri, 'wp-login.php' );
$is_admin = is_admin();
$action = isset( $_REQUEST['action'] ) ? sanitize_key( wp_unslash( $_REQUEST['action'] ) ) : '';
if ( in_array( $action, array( 'lostpassword', 'retrievepassword', 'rp', 'resetpass' ), true ) ) {
return $pre;
}
if ( ! $is_login && ! $is_admin ) {
return $pre;
}
return true;
}
add_filter( 'pre_wp_mail', 'croplogic_skip_slow_wp_mail', 10, 2 );
@@ -1 +0,0 @@
.elementor-11 .elementor-element.elementor-element-b4730ed{--display:flex;}.elementor-11 .elementor-element.elementor-element-8d8be18 .crop-logic-chat{min-height:760px;--cl-radius:28px;--cl-primary:#2b8a3e;--cl-accent:#2d9cdb;--cl-bg:#f5f7f1;--cl-surface:#ffffff;--cl-border:rgba(43, 138, 62, 0.15);--cl-text:#16331b;--cl-muted:#5f6f62;--cl-user-bubble:rgba(43, 138, 62, 0.12);--cl-assistant-bubble:#ffffff;--cl-input-bg:#ffffff;}
@@ -1 +0,0 @@
.elementor-13 .elementor-element.elementor-element-f2b90d8{--display:flex;}.elementor-13 .elementor-element.elementor-element-b47d29f .crop-logic-chat{--cl-primary:#2b8a3e;--cl-accent:#2d9cdb;--cl-bg:#f5f7f1;--cl-surface:#ffffff;--cl-border:rgba(43, 138, 62, 0.15);--cl-text:#16331b;--cl-muted:#5f6f62;--cl-user-bubble:rgba(43, 138, 62, 0.12);--cl-assistant-bubble:#ffffff;--cl-input-bg:#ffffff;}
@@ -1 +0,0 @@
.elementor-20 .elementor-element.elementor-element-0bf8074{--display:flex;}.elementor-20 .elementor-element.elementor-element-105d04b .crop-logic-chat{--cl-primary:#2b8a3e;--cl-accent:#2d9cdb;--cl-bg:#f5f7f1;--cl-surface:#ffffff;--cl-border:rgba(43, 138, 62, 0.15);--cl-text:#16331b;--cl-muted:#5f6f62;--cl-user-bubble:rgba(43, 138, 62, 0.12);--cl-assistant-bubble:#ffffff;--cl-input-bg:#ffffff;}
@@ -1 +0,0 @@
.elementor-kit-5{--e-global-color-primary:#6EC1E4;--e-global-color-secondary:#54595F;--e-global-color-text:#7A7A7A;--e-global-color-accent:#61CE70;--e-global-typography-primary-font-family:"Roboto";--e-global-typography-primary-font-weight:600;--e-global-typography-secondary-font-family:"Roboto Slab";--e-global-typography-secondary-font-weight:400;--e-global-typography-text-font-family:"Roboto";--e-global-typography-text-font-weight:400;--e-global-typography-accent-font-family:"Roboto";--e-global-typography-accent-font-weight:500;}.elementor-section.elementor-section-boxed > .elementor-container{max-width:1140px;}.e-con{--container-max-width:1140px;}.elementor-widget:not(:last-child){--kit-widget-spacing:20px;}.elementor-element{--widgets-spacing:20px 20px;--widgets-spacing-row:20px;--widgets-spacing-column:20px;}{}h1.entry-title{display:var(--page-title-display);}@media(max-width:1024px){.elementor-section.elementor-section-boxed > .elementor-container{max-width:1024px;}.e-con{--container-max-width:1024px;}}@media(max-width:767px){.elementor-section.elementor-section-boxed > .elementor-container{max-width:767px;}.e-con{--container-max-width:767px;}}