blog icon indicating copy to clipboard operation
blog copied to clipboard

又一篇 Deployer 的使用攻略 - overtrue

Open overtrue opened this issue 6 years ago • 23 comments

https://overtrue.me/articles/2018/06/deployer-guide.html

其实网上有相当多的关于 Deployer 的使用教程,在这个社区也有不少同学写过,不过发现很难找到一个完整能跑通的文章,所以希望今天写这篇是一个小白就能完整走通的教程吧,当然了,这是回忆加参考外文写出来的,难免也有失误,欢迎小白同学在下面反馈使用过程中遇到的问题为谢! 基础知识 在开始之前,有必要了解一下 Deployer 是一个什么样的东西。 Deployer 是一个基于 SSH 协议的无侵入 web 项目部署工具,因为它不需要你在目标服务器上装什么服务之类的东西即可使用,它只需要在你的开发机,或者你的笔记本,就是发起部署动作的一方安装即可。 它的原理就是通过 SSH 到你的机器去创建...

overtrue avatar Jul 02 '18 02:07 overtrue

xin6841414 avatar Jul 04 '18 15:07 xin6841414

@xin6841414 唉

咋了?

overtrue avatar Jul 05 '18 03:07 overtrue

就喜欢这样式儿用心的小白科普文

faydanube avatar Sep 27 '18 08:09 faydanube

哈哈哈😄

LiuZhengming [email protected]于2018年9月27日 周四下午4:28写道:

就喜欢这样式儿用心的小白科普文

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/overtrue/blog/issues/33#issuecomment-425004420, or mute the thread https://github.com/notifications/unsubscribe-auth/ABZ3YIpyZYDhfVNntXCv7zmIY6qyQlNRks5ufIwxgaJpZM4U-mQ1 .

overtrue avatar Sep 27 '18 08:09 overtrue

你好,这个可以部署在docker上吗

alexxd35 avatar Oct 24 '18 02:10 alexxd35

@xin6841414 唉

咋了?

没事的,感慨你咋会那么多,跟紧大神步伐,自己努力加油

xin6841414 avatar Oct 24 '18 02:10 xin6841414

@alexxd35 严格来讲哪里都可以啊,只要跟跑 PHP 与 ssh 就可以

overtrue avatar Oct 24 '18 04:10 overtrue

@overtrue @alexxd35 严格来讲哪里都可以啊,只要跟跑 PHP 与 ssh 就可以

不知道要怎样可以连入一个服务器里的容器里面。因为我想开一个容器是专门拉代码的,然后数据卷映射的宿主机上面,然后别的容器也可以直接读取宿主机上那个数据卷。

alexxd35 avatar Oct 24 '18 04:10 alexxd35

@alexxd35 这个你需要自己解决哦,一两句话又讲不清楚,不过话说回来为啥搞这么复杂哇

overtrue avatar Oct 24 '18 13:10 overtrue

@alexxd35 这个你需要自己解决哦,一两句话又讲不清楚,不过话说回来为啥搞这么复杂哇

我已经部署好了。 其实也不是复杂,只是想把专门负责部署的这个服务放进容器里,然后其他的服务放进其他的容器这样。

alexxd35 avatar Oct 24 '18 14:10 alexxd35

感谢超哥!么么哒!

ramzeng avatar Feb 18 '19 03:02 ramzeng

我这个github_id,一下就暴露了 T.T

ramzeng avatar Feb 18 '19 03:02 ramzeng

我这个github_id,一下就暴露了 T.T

哈哈

overtrue avatar Feb 18 '19 07:02 overtrue

@overtrue

我这个github_id,一下就暴露了 T.T

哈哈

@overtrue

我这个github_id,一下就暴露了 T.T

哈哈

bruselian avatar Apr 02 '19 07:04 bruselian

超哥,碰到问题了 In Client.php line 99:

The command "command -v 'php' || which 'php' || type -p 'php'" failed.

Exit Code: 1 (General error)

Host Name: 192.144.100.100

================
which: no php in (/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin)

loyalself avatar Apr 14 '19 06:04 loyalself

超哥,碰到问题了 In Client.php line 99:

The command "command -v 'php' || which 'php' || type -p 'php'" failed.

Exit Code: 1 (General error)

Host Name: 39.105.2.217

================ which: no php in (/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin)

观察一下你的 PHP 路径

ramzeng avatar Apr 14 '19 06:04 ramzeng

@iymiym

超哥,碰到问题了 In Client.php line 99:

The command "command -v 'php' || which 'php' || type -p 'php'" failed.

Exit Code: 1 (General error)

Host Name: 39.105.2.217

================ which: no php in (/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin)

观察一下你的 PHP 路径

我的php路径是在/usr/local/php/bin 下面,我已经将它加入到全局里面去了,但是还是这样

loyalself avatar Apr 14 '19 07:04 loyalself

@iymiym

超哥,碰到问题了 In Client.php line 99: The command "command -v 'php' || which 'php' || type -p 'php'" failed. Exit Code: 1 (General error) Host Name: 39.105.2.217

which: no php in (/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin)

观察一下你的 PHP 路径

我的php路径是在/usr/local/php/bin 下面,我已经将它加入到全局里面去了,但是还是这样

Deployer 配置里,我记得是可以指定 PHP 路径的

ramzeng avatar Apr 14 '19 07:04 ramzeng

@iymiym

@iymiym

超哥,碰到问题了 In Client.php line 99: The command "command -v 'php' || which 'php' || type -p 'php'" failed. Exit Code: 1 (General error) Host Name: 39.105.2.217

which: no php in (/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin)

观察一下你的 PHP 路径

我的php路径是在/usr/local/php/bin 下面,我已经将它加入到全局里面去了,但是还是这样

Deployer 配置里,我记得是可以指定 PHP 路径的

因为我的php是编译安装的,之前有个服务器是yum安装的,deploy就没事,但是用编译的就报错了

loyalself avatar Apr 14 '19 07:04 loyalself

超哥,小项目没有使用composer deploy 的时候如何让屏蔽 它查找composer.json

cuiqg avatar May 06 '19 15:05 cuiqg

yeah, finally uesd

abrahamgreyson avatar Nov 08 '19 10:11 abrahamgreyson

@abrahamgreyson 哈哈

overtrue avatar Nov 08 '19 10:11 overtrue

Saving key "~/.ssh/deployerkey" failed: No such file or directory 无法生成密钥怎么解决?

hechengweia avatar Mar 25 '22 09:03 hechengweia