我正在使用kudu在azure应用程序服务中部署我的应用程序。
默认情况下,kudu只在我的laravel应用程序中运行composer install,但我还需要运行一些额外的npm脚本才能让我的网站正常工作。
我已尝试使用此url格式下载默认deploy.cmd脚本,如本文档中所述: https://{sitename}.scm.azurewebsites.net/api/deploymentscript
但我得到一个错误说: {"Message":"Operation only supported if not using a custom deployment script"}
在下一个解决方案中,我在本地windows计算机中全局下载了kuduscript cli,以便在项目的根目录中生成一个default deploy.cmd,但我也得到一个错误,该错误表示: error: ENOENT: no such file or directory, open 'C:\Users\USER\AppData\Roaming\npm\node_modules\kuduscript\lib\templates\deploy.batch.php.template'
然后我在:kudu repository中找到了这个php应用程序的deploy.cmd模板
在我的部署中进行测试时,它会导致以下错误:
Command: bash deploy.cmd
deploy.cmd: line 1: @if: command not found
deploy.cmd: line 3: ::: command not found
deploy.cmd: line 4: ::: command not found
deploy.cmd: line 5: ::: command not found
deploy.cmd: line 6: ::: command not found
deploy.cmd: line 8: ::: command not found
deploy.cmd: line 9: ::: command not found
deploy.cmd: line 11: ::: command not found
deploy.cmd: line 12: nul: Permission denied
deploy.cmd: line 13: syntax error near unexpected token `('
deploy.cmd: line 13: `IF %ERRORLEVEL% NEQ 0 ('
deploy.cmd: line 1: @if: command not found\r\ndeploy.cmd: line 3: ::: command not found\r\ndeploy.cmd: line 4: ::: command not found\r\ndeploy.cmd: line 5: ::: command not found\r\ndeploy.cmd: line 6: ::: command not found\r\ndeploy.cmd: line 8: ::: command not found\r\ndeploy.cmd: line 9: ::: command not found\r\ndeploy.cmd: line 11: ::: command not found\r\ndeploy.cmd: line 12: nul: Permission denied\r\ndeploy.cmd: line 13: syntax error near unexpected token `('\r\ndeploy.cmd: line 13: `IF %ERRORLEVEL% NEQ 0 ('\r\nD:\Program Files (x86)\SiteExtensions\Kudu\85.11024.4154\bin\Scripts\starter.cmd bash deploy.cmd
我已经没有选择了。
laravel版本:5.8
运行时堆栈:PHP7.2
暂无答案!
目前还没有任何答案,快来回答吧!