templates/deployment.yaml を更新
This commit is contained in:
@@ -30,6 +30,9 @@ spec:
|
|||||||
echo "Copying WordPress core files to ephemeral storage..."
|
echo "Copying WordPress core files to ephemeral storage..."
|
||||||
cp -rp /usr/src/wordpress/* /var/www/html/
|
cp -rp /usr/src/wordpress/* /var/www/html/
|
||||||
|
|
||||||
|
echo "Removing temporary wp-content from core files..."
|
||||||
|
rm -rf /var/www/html/wp-content
|
||||||
|
|
||||||
if [ ! -d /var/www/html-persistent/wp-content ]; then
|
if [ ! -d /var/www/html-persistent/wp-content ]; then
|
||||||
echo "Initializing wp-content directory..."
|
echo "Initializing wp-content directory..."
|
||||||
mkdir -p /var/www/html-persistent/wp-content
|
mkdir -p /var/www/html-persistent/wp-content
|
||||||
@@ -38,9 +41,12 @@ spec:
|
|||||||
echo "wp-content already exists, preserving user data"
|
echo "wp-content already exists, preserving user data"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
rm -rf /var/www/html/wp-content
|
echo "Creating symlink for wp-content..."
|
||||||
ln -sf /var/www/html-persistent/wp-content /var/www/html/wp-content
|
ln -sf /var/www/html-persistent/wp-content /var/www/html/wp-content
|
||||||
|
|
||||||
|
echo "Verifying symlink..."
|
||||||
|
ls -la /var/www/html/ | grep wp-content
|
||||||
|
|
||||||
echo "Generating wp-config.php from Secret..."
|
echo "Generating wp-config.php from Secret..."
|
||||||
cat > /var/www/html/wp-config.php << 'EOF'
|
cat > /var/www/html/wp-config.php << 'EOF'
|
||||||
<?php
|
<?php
|
||||||
|
|||||||
Reference in New Issue
Block a user