我正在使用带有 laravel 和 rsync 配方的 Deployer PHP 来部署我的 Laravel 项目,但由于某种原因,文件storage/app
夹中的文件没有从 git 分支复制到服务器上的存储文件夹。.gitignore 设置正确,我需要同步的文件实际上在 git 中。所以问题似乎在于 Deployer 没有将文件复制到文件shared/storage/app
夹
存储/应用程序/.gitignore:
*
!.gitignore
!public/
!public/*
!templates/
!templates/*
!templates/fonts/
!templates/fonts/*
部署者.php
<?php declare(strict_types=1);
namespace Deployer;
// Include the Laravel & rsync recipes:
require 'recipe/rsync.php';
require 'recipe/laravel.php';
...
set('rsync_src', function () {
return __DIR__ . '/www'; // My LAravel project is in a sub folder of the git branch
});
// Configuring the rsync exclusions.
add('rsync', [
'exclude' => [
'.git',
'/.env',
'/storage/framework/',
'/storage/logs/',
'/vendor/',
'/node_modules/',
'.gitlab-ci.yml',
'deploy.php',
],
]);
...
关于这里可能出现的问题和可能的解决方案有什么想法吗?