[英]How to deploy a webapplication in a single phar file with composer?
I intend to use single phar file with digital signature to deploy a web application. 我打算使用带有数字签名的单个phar文件来部署Web应用程序。 Combined this with event sourcing would make me very easy to follow release early, release often philosophy...
将此与事件来源相结合,将使我非常容易地及早关注发布,经常发布哲学...
I am using composer as package manager. 我正在使用composer作为程序包管理器。 What I am uncertain:
我不确定的是:
To answer some of your questions: 要回答您的一些问题:
composer install
, get a directory tree of your own files and vendor files, and can then add these all into the .phar file you are about to create. composer install
,获取您自己的文件和供应商文件的目录树,然后就可以将它们全部添加到您要创建的.phar文件中。 __DIR__
to know where it is, and where other files are relative from this constant. __DIR__
来知道它在哪里,以及该常量相对其他文件在哪里。 This should be compatible with .phar files. Note that there are already libraries that help you creating .phar files. 请注意,已经有可以帮助您创建.phar文件的库。 Have a look at kherge/box , for example.
例如,看看kherge / box 。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.