Updates for copy files

This commit is contained in:
David Bomba
2024-12-03 14:49:58 +11:00
parent 84dcb8caab
commit c4e1d0e3a5
2 changed files with 6 additions and 6 deletions

View File

@@ -54,13 +54,13 @@ fi
# Clean the existing public/ directory but exclude .js and .css files
if [ -d /var/www/html/public ]; then
echo "Cleaning up stale files in public/ directory, retaining .js and .css files..."
find /var/www/html/public -type f ! -name '*.js' ! -name '*.css' -exec rm -f {} \;
echo "Cleaning up .js and .css files in public/ directory..."
find /var/www/html/public -type f \( -name '*.js' -o -name '*.css' \) -exec rm -f {} \;
fi
# Copy the public/ directory from the image to the mounted volume
echo "Copying public/ directory from image to volume..."
cp -r /image-original/public/* /var/www/html/public/
cp -r /image-original/public/* /var/www/html/
# Clear and cache config in production