使用 laravel 5.8 envoy 命令,我部署在远程服务器上,并在命令行中设置密码,例如:
envoy run Hostels2Deploy --lardeployer_password=111 --app_version=0.105a
和特使文件:
@setup
$server_login_user= 'lardeployer';
$lardeployer_password = isset($lardeployer_password) ? $lardeployer_password : "Not Defined";
@endsetup
@servers(['dev' => $server_login_user.':'.$lardeployer_password.'@NNN.NN.NNN.N'])
@task('clean_old_releases')
echo "Step # 81";
echo 'The password is: {{ $lardeployer_password }}';
echo 'The $server_login_user is: {{ $server_login_user }}';
echo "Step # 00 app_version ::{{ $app_version }}";
cd {{ $release_number_dir }}
# php artisan envoy:delete-old-versions Hostels2Deployed
@endtask
@macro('Hostels2Deploy',['on'=>'dev'])
clean_old_releases
@endmacro
使用@servers 块中的凭据,我希望我不必手动输入密码,但在命令行中我会看到输入密码的提示。我输出 $server_login_user 和 $lardeployer_password 变量,它们具有有效值。
哪个是有效路径?