【问题标题】:Magento 2 gets stuck in maintenance mode when deploying to production modeMagento 2 在部署到生产模式时陷入维护模式
【发布时间】:2018-02-13 22:43:52
【问题描述】:

我最近将我的 Magento 2 项目置于开发者模式,这样我就可以启用路径提示并重新编译一些 LESS 代码。当我将站点恢复到生产模式时,它似乎在终端中停止,然后整个站点只返回一条错误消息。

magento deploy:mode:set production

# it gets this far before failing
Enabled maintenance
Starting compilation

此时,我必须禁用维护模式并将其重新设置为开发人员模式才能恢复网站。这是我在网站因尝试将其置于生产模式而关闭时收到的消息。

Exception #0 (Exception): Unable to proceed: the maintenance mode is enabled

我唯一成功的尝试是在将模式设置为生产模式时使用--skip-compilation 标志。但是,这样做似乎让我在结帐过程中缺少 javascript 资产,从而完全禁用了结帐过程。

任何想法如何正确部署 Magento 2 而不会出现此类问题?

【问题讨论】:

    标签: magento deployment magento2


    【解决方案1】:

    在使用--skip-compilation 标志将静态资产置于生产模式后重新部署静态资产后,我能够成功地正确部署所有内容。仍然觉得我不得不破解我的部署方式,但已经完成了。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2018-05-30
      • 1970-01-01
      • 2021-09-09
      • 2011-12-26
      • 1970-01-01
      相关资源
      最近更新 更多