sh 使用静态内容部署和编译来清理所有内容
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了sh 使用静态内容部署和编译来清理所有内容相关的知识,希望对你有一定的参考价值。
#!/usr/bin/env bash
cd /var/www/vhosts/partyshowroom/production/htdocs/
echo 'Clearing magento cache...'
rm -rf /var/www/vhosts/partyshowroom/production/htdocs/var/cache/*
echo 'Clearing page cache...'
rm -rf /var/www/vhosts/partyshowroom/production/htdocs/var/page_cache/*
echo 'Restarting Varnish service'
sudo /etc/init.d/varnish restart
echo 'Clear generation files...'
rm -rf /var/www/vhosts/partyshowroom/production/htdocs/var/generation/*
echo 'Clear view preprocessed...'
rm -rf /var/www/vhosts/partyshowroom/production/htdocs/var/view_preprocessed/*
echo 'Clear Static files...'
rm -rf /var/www/vhosts/partyshowroom/production/htdocs/pub/static/*
echo 'Running setup upgrade'
php /var/www/vhosts/partyshowroom/production/htdocs/bin/magento setup:upgrade
echo 'Running di compile'
php /var/www/vhosts/partyshowroom/production/htdocs/bin/magento setup:di:compile
echo 'Running static content deploy'
php /var/www/vhosts/partyshowroom/production/htdocs/bin/magento setup:static-content:deploy en_US en_GB
echo 'Clean complete'
以上是关于sh 使用静态内容部署和编译来清理所有内容的主要内容,如果未能解决你的问题,请参考以下文章
sh 部署静态内容
jenkins 每次编译前清理workspace空间
sh Cleaner.sh - 用于清理目录内容的Bash脚本
新部署后如何清理缓存?
redis的安装和清理缓存操作
sh magento更新静态内容