templates/deployment.yaml を更新

This commit is contained in:
2025-11-22 13:25:07 +00:00
parent 70dfd78b87
commit 2ba161fb5b

View File

@@ -79,15 +79,15 @@ define('NONCE_SALT', getenv('WP_NONCE_SALT'));
// ** WordPress Site URLs - Dynamic based on HTTP_HOST ** //
if ( defined( 'WP_CLI' ) ) {
$_SERVER['HTTP_HOST'] = '127.0.0.1';
$_SERVER['HTTP_HOST'] = '127.0.0.1';
}
// Determine protocol (HTTP or HTTPS)
$protocol = 'http';
if ( isset($_SERVER['HTTP_X_FORWARDED_PROTO']) && $_SERVER['HTTP_X_FORWARDED_PROTO'] === 'https' ) {
$protocol = 'https';
$protocol = 'https';
} elseif ( isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] !== 'off' ) {
$protocol = 'https';
$protocol = 'https';
}
define( 'WP_HOME', $protocol . '://' . $_SERVER['HTTP_HOST'] . '/' );
@@ -111,7 +111,7 @@ define('WP_MAX_MEMORY_LIMIT', '512M');
/* That's all, stop editing! Happy publishing. */
if ( ! defined( 'ABSPATH' ) ) {
define( 'ABSPATH', __DIR__ . '/' );
define( 'ABSPATH', __DIR__ . '/' );
}
require_once ABSPATH . 'wp-settings.php';
@@ -119,6 +119,8 @@ WPCONFIG
echo "wp-config.php generated"
echo "wp-config.php generated"
# WordPress CLI のセットアップ
echo "Setting up WP-CLI..."
curl -o /tmp/wp-cli.phar https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar 2>/dev/null || true