templates/deployment.yaml を更新
This commit is contained in:
@@ -163,20 +163,19 @@ spec:
|
|||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
echo "WordPress is already installed, skipping installation"
|
echo "WordPress is already installed, skipping installation"
|
||||||
fi
|
if [ -f /tmp/wp-cli.phar ]; then
|
||||||
|
|
||||||
if [ ! -z "$TABLES" ]; then
|
|
||||||
echo "Running WordPress core update check..."
|
echo "Running WordPress core update check..."
|
||||||
CURRENT_VERSION=$(cat /usr/src/wordpress/wp-includes/version.php | grep "wp_version = " | cut -d "'" -f 2 || echo "unknown")
|
CURRENT_VERSION=$(cat /usr/src/wordpress/wp-includes/version.php | grep "wp_version = " | cut -d "'" -f 2 || echo "unknown")
|
||||||
echo "Target WordPress version: $CURRENT_VERSION"
|
echo "Target WordPress version: $CURRENT_VERSION"
|
||||||
/tmp/wp-cli.phar --path=/var/www/html core update-db 2>/dev/null || echo "No database update needed"
|
/tmp/wp-cli.phar --path=/var/www/html core update-db 2>/dev/null || echo "No database update needed"
|
||||||
fi
|
fi
|
||||||
|
fi
|
||||||
{{- if .Values.wordpress.adsTxt.enabled }}
|
{{- if .Values.wordpress.adsTxt.enabled }}
|
||||||
|
|
||||||
echo "Deploying ads.txt..."
|
echo "Deploying ads.txt..."
|
||||||
cat > /var/www/html/ads.txt <<'ADSTXTEOF'
|
cat > /var/www/html/ads.txt << 'EOF'
|
||||||
{{ .Values.wordpress.adsTxt.content }}
|
{{ .Values.wordpress.adsTxt.content }}
|
||||||
ADSTXTEOF
|
EOF
|
||||||
echo "ads.txt deployed"
|
echo "ads.txt deployed"
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user