Deployer recipe中Laravel配置文件

发布时间:2019-08-08 发布网站:脚本宝典
脚本宝典收集整理的这篇文章主要介绍了Deployer recipe中Laravel配置文件脚本宝典觉得挺不错的,现在分享给大家,也给大家做个参考。

1 laravel.php

reciPE目录下包含了常用框架的部署配置文件
这里以Laravel框架的部署配置为例进行分析
在laravel.php中主要配置了laravel框架的相关目录
shared_dirs : 
shareD_files :
wrITable_dirs:
laravel_version
另外还定义了larvael的常用命令
artisan:up
artisan:down
artisan:migrate
artisan:migrate:fresh
artisan:migrate:rollback
artisan:migrate:status
artisan:db:seed
artisan:cache:clear
artisan:config:cache
artisan:route:cache
artisan:view:clear
artisan:optimize
artisan:queue:Restart
artisan:storage:link
deploy:public_disk
然后定义了larvael的部署流程
deploy

2 common.php 公共配置

在配置文件recipelaravel.php中首先引入了公共配置文件common.php
;recipecommon.php
require __DIR__ . '/config/current.php';
require __DIR__ . '/config/dump.php';
require __DIR__ . '/config/hosts.php';
require __DIR__ . '/deploy/info.php';
require __DIR__ . '/deploy/PRepare.php';
require __DIR__ . '/deploy/lock.php';
require __DIR__ . '/deploy/release.php';
require __DIR__ . '/deploy/update_code.php';
require __DIR__ . '/deploy/clear_paths.php';
require __DIR__ . '/deploy/shared.php';
require __DIR__ . '/deploy/writable.php';
require __DIR__ . '/deploy/vendors.php';
require __DIR__ . '/deploy/syMLink.php';
require __DIR__ . '/deploy/cleanup.php';
require __DIR__ . '/deploy/copy_dirs.php';
require __DIR__ . '/deploy/rollback.php';
common.php公共配置文件中 加载了config和deploy两个目录下的配置文件
另外还定义了几个常用变量信息
hostname user target
常用配置参数
keep_releasese
repository
shared_dirs
shared_files
copy_dirs

wirtable_dirs
writable_mode 
writable_use_sudo
writable_chmod_mode
writable_chmod_recursive

http_user
http_group

clear_paths
clear_use_sudo

use_atomic_symlink
composer_action
composer_options
env
currrent_path
常用命令
bin/php
bin/git
bin/composer
bin/symlink
选项参数
tag
revision
branch
两个命令
sucess
deploy:failed

3 config的配置文件

1 current.php

查看当前工作目录 命令
config:current

2 dump.php

查看配置信息 命令
config:dump

3 hosts.php

查看所有主机命令
config:hosts

4 deploy的配置文件

deploy目录下配置了部署中常用的命令
这些命令与common.php的参数有关

1 cleanup.php

清理旧的发布版本 cleanup

2 clear_paths.php

清理指定目录 clear_paths

3 copy_dirs.php

同步拷贝目录 deploy:copy_dirs

4 info.php

获取参数信息 deploy:info

5 lock.php

创建锁定文件 deploy:lock

6 prepare.php

创建基本目录 deploy:prepare

7 release.php

部署新版本 deploy:release

8 shared.php

9 symlink.php

10 update_code.php

11 vendors.php

12 writable.php

5 总结

总的配置文件分为三个层次
config和deploy层次规定了常用命令
common.php规定了常用参数
laravel.php规定laravel框架的参数和部署流程

-2018.4.8 21:47

脚本宝典总结

以上是脚本宝典为你收集整理的Deployer recipe中Laravel配置文件全部内容,希望文章能够帮你解决Deployer recipe中Laravel配置文件所遇到的问题。

如果觉得脚本宝典网站内容还不错,欢迎将脚本宝典推荐好友。

本图文内容来源于网友网络收集整理提供,作为学习参考使用,版权属于原作者。
如您有任何意见或建议可联系处理。小编QQ:384754419,请注明来意。