![](/img/trans.png)
[英]Deploy php web application on Elastic Beanstalk using Jenkins, git and eb cli
[英]How to deploy php application to a live web server using ant and git
我需要一個可以使用ant和git將php應用程序部署到Web服務器的解決方案。 我需要將文件復制到Web服務器並運行一個php腳本來設置數據庫。
我正在考慮使用sshexec運行將更新文件並運行php腳本的命令
<target name="deploy">
<sshexec host="host"
port="22"
username="user"
password="****"
trust="true"
command="..."/>
</target>
有人有完整的解決方案嗎? 甚至更好的解決方案?
如果您需要定期將更改的文件集復制到服務器並在每次更新后執行已知的腳本,則可以使用git push
進行復制,以及使用post-receive
git鈎子(http://book.git-scm.com /5_git_hooks.html)調用腳本。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.